Check if a Character is a Letter in JavaScript
September 2025
This is a way to check if a character is a U.S. English lower or uppercase letter via it's unicode value.
JavaScript
Here's an example:
HTML
waiting
Character to check:
Output
waiting
JavaScript
window. =
end of line
Endnotes
Unicode values 65-90 are uppercase letters A-Z.
Values 97-122 are the lowercase a-z.
You can look for characters from other languages by including their unicode values.
The opposite of .toCharCode() is String.fromCharCode()
TODO: Look up reg ex approaches to see if they handle characters with accents