Checks if a string contains only alpha characters.
RegExp.prototype.test()
to check if the given string matches against the alphabetic regexp pattern.const isAlpha = str => /^[a-zA-Z]*$/.test(str);
isAlpha('sampleInput'); // true
isAlpha('this Will fail'); // false
isAlpha('123'); // false
JavaScript, String
Checks if a string contains only alphanumeric characters.
JavaScript, String
Checks if the given string contains any whitespace characters.
JavaScript, String
Checks if a string is an anagram of another string (case-insensitive, ignores spaces, punctuation and special characters).