how to see if a single char is a string javascript code example
Example 1: how to check if a string has only alphabets in javascript
if (!/[^a-zA-Z]/.test(word))
Example 2: javascript count character in string
var str = "Hello World!";
var n = str.length;