How to test whether a character is numeric, upper case, or lower case?
<p>I am trying to get this bit of JavaScript to run.  I keep getting an error that says:</p>

<pre><code>ThisChar.toUpperCase() is not a function 
</code></pre>

<p>I have tried using jsfiddle.net but can't seem to get around this error.  What going on with this?</p>

<pre><code>// CREATE ARRAY OF CHARACTERS
CharacterArray = ["1", "2", "3", "a", "b", "c", "D", "E", "F", "/", "+", ")"];

// TEST CHARACTERS 
function testCharacters() {
   // GET ARRAY LEN
   var CharacterArrayLen = CharacterArray.length;
   // LOOP THROUGH ARRAY
   for (i = 0; i &lt; CharacterArrayLen; i++) {
       // PARSE SINGLE CHARACTER
       var ThisChar = CharacterArray.slice(i, i + 1);
       if (!isNaN(ThisChar * 1)) {
           alert(ThisChar + ' is numeric!');
       } else {
           if (ThisChar == ThisChar.toUpperCase()) {
               alert(ThisChar + ' is upper case true');
           } else if (ThisChar == ThisChar.toLowerCase()) {
               alert(ThisChar + " is lower case");
           } else {
               alert(ThisChar + " is unknown");
           }
       }
   }
}
testCharacters();​
</code></pre>
