title: How to tell if all characters in a string are same
body: <p>I want to know if all characters in a string are same. I am using it for a Password
  so that i tell the user that your password is very obvious.
  I have crated this</p>
  
  <pre><code>$(function(){
      $('#text_box').keypress(function(){
          var pass = $("#text_box").val();
          if(pass.length&lt;7)
              $("#text_box_span").html('password must be atleast 6 characters');
          else
              $("#text_box_span").html('Good Password');
      });
  });
  </code></pre>
  
  <p>How can I achieve the same characters?</p>