I don’t believe there is a built-in function for that. But it’s easy enough to write with a regex
function isLetter(str) {
return str.length === 1 && str.match(/[a-z]/i);
}
More Related Contents:
- How do I make the first letter of a string uppercase in JavaScript?
- Repeat a string in JavaScript a number of times
- How can I remove a character from a string using JavaScript?
- Trying to capitalize the first character in array of strings, why this is not working?
- How do I replace a character at a particular index in JavaScript?
- How to check if a string “StartsWith” another string?
- Fastest method to replace all instances of a character in a string [duplicate]
- Evaluating a string as a mathematical expression in JavaScript
- How can I use backslashes (\) in a string?
- Strip all non-numeric characters from string in JavaScript
- Convert string with commas to array
- Check for special characters in string
- String to object in JS
- Regular expression which matches a pattern, or is an empty string
- javascript regular expression to check for IP addresses
- Replace all spaces in a string with ‘+’ [duplicate]
- Passing regex modifier options to RegExp object
- How do I split a string into an array of characters? [duplicate]
- Convert JavaScript String to be all lower case
- Efficient Javascript String Replacement
- match() returns array with two matches when I expect one match
- Javascript string comparison fails when comparing unicode characters
- HEX to Base64 converter for JavaScript
- how to convert a string to a Unix timestamp in javascript?
- Are ES6 template literals faster than string concatenation?
- How Can I Truncate A String In jQuery?
- Javascript / Jquery – Get number from string
- How to test if a URL string is absolute or relative?
- How to add spaces between every character in a string?
- javascript – Convert array to string while preserving brackets