All indicators is that this code should work. It does not. Check it out:
aString = "Why doesn't this work?";
if ( typeof aString == String) {
alert("I am a string!!!");
}
Only if I add quotations and make string minuscule, does it work.
aString = "This does work, but why?";
if ( typeof aString == 'string') {
alert("I am a string!!!");
}