JavaScript:实现检查字符是否为字母算法
/**
* Check if the Character is letter or not
* @param {String} str - character to check
* @return {object} An array with the character or null if isn't a letter
*/
function isLetter (str) {
return str.length === 1 && str