I am extracting a character in a Javascript string with:
var first = str.charAt(0);
and I would like to check whether it is a letter. Stran
So we got a first character using charArt() function then try to match ir using regular expression to check if there is an letter lowercased starting from a to z and return it results as a boolean
Boolean('#Foo'.charAt(0).match(/[a-zA-Z]/)) // false
Boolean('Foo'.charAt(0).match(/[a-zA-Z]/)) // true