javascript check if letter is letter code example
Example 1: how to check if a string has only alphabets in javascript
if (!/[^a-zA-Z]/.test(word))
Example 2: check if something is a letter in js
string.charAt(1).toUpperCase() !== string.charAt(1).toLowerCase()