check if variable is alphabet or not in js code example
Example: checking if a character is an alphabet in js
function isLetter(str) {
return str.length === 1 && str.match(/[a-z]/i);
}
function isLetter(str) {
return str.length === 1 && str.match(/[a-z]/i);
}