title: How to check if a character is a letter or a number in javascript?
body: <p>I am new to javascript I'm trying to check user entered the alphabet or a number. 
  if the user enters "A" it shows <strong>Alphabet</strong> it's ok but if the user enters "1" I want to show <strong>Number</strong> but its show alphabet.
  where i done wrong.
  Thanks Advance</p>
  
  <pre><code>function CHECKCHARATCTER(Letter) {
      if (Letter.length &lt;= 1) {
        if ((64 &lt; Letter.charCodeAt(0) &lt; 91) || (96 &lt; Letter.charCodeAt(0) &lt; 123)) {
          return "Alphabhate";
        }
        else if (47 &lt; Letter.charCodeAt(0) &lt; 58) {
          return "NUMBER";
        }
        else { return "Its NOt a NUMBER or Alphabets"; }
      }
      else { return ("Please enter the single character"); }
  }
  a = prompt("enter the number or Alphabhate");
  alert(typeof (a));
  b = CHECKCHARATCTER(a);
  alert(b);
  </code></pre>