[JavaScript] Checking if a letter is alphabetic without Regex


We return whether or not the upper case version of a character is equal to the lower case version of a character. If the character was a space or a punctuation symbol such as a comma or period, this function would have returned true because toUppercase() and toLowerCase() has no effect on these specific characters. This implies that the character we are checking is not alphabetic.


Comments