checking if a character is an alphabet in js

JavaScript
function isLetter(str) {
  return str.length === 1 && str.match(/[a-z]/i);
}
Source

Also in JavaScript: