I\'m trying to check that the first character of a username is capital, the following can be letters or numbers and at most 20 characters long. Can someone explain why my synta
I would do it like this:
var firstChar = strToCheck.substring(0, 1); if (firstChar == firstChar.toUpperCase()) { // it is capital :D }