Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to check if a string has only alphabets in javascript

if (!/[^a-zA-Z]/.test(word))
Comment

checking if a character is an alphabet in js

function isLetter(str) {
  return str.length === 1 && str.match(/[a-z]/i);
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: text number of lines react native 
Javascript :: javascript scroll to element 
Javascript :: go to page jquery 
Javascript :: check if path is folder js 
Javascript :: javascript to redirect to another page after 5 seconds 
Javascript :: express js clear cookie 
Javascript :: node.js gitignore 
Javascript :: sort object alphabetically javascript 
Javascript :: how to check if selector exists or is present puppeteer 
Javascript :: javascript sort boolean value 
Javascript :: vuejs v-for reverse 
Javascript :: js redirect to relative url 
Javascript :: kill all node process ubunut 
Javascript :: javascript biggest number 
Javascript :: copy text to clipboard javascript 
Javascript :: js reload page 1024 breakpoint 
Javascript :: react native flatlist horizontal scroll 
Javascript :: gdscript yield timer 
Javascript :: Get First Day and last day of week javascript 
Javascript :: jquery scroll to top of div animate 
Javascript :: javascript convert seconds to minutes seconds 
Javascript :: seconds to hh mm ss javascript 
Javascript :: Could not resolve dependency error peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4 
Javascript :: regex validate money 
Javascript :: find difference between string js 
Javascript :: round till 2 digit in jquery 
Javascript :: javascript get length of object 
Javascript :: angular ng serve with custom port 
Javascript :: javascript-find-json-value 
Javascript :: javascript base64 encode 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =