Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

javascript check if value is only a number code example

Example: check if string only contains integer digits numbers javascript

let val = '1234567890' 
let isnum = /^\d+$/.test(val);
if (isnum) {
  // val is a number
}

Tags:

Javascript Example

Related

ddjango rest serializer code example pyspark hadoop version code example set sql_mode only full droup by off code example find word occurrence in string php code example sql 2014 for loop code example check is variable is set php code example describe prototype javascript code example php unit test example remove border from last div in css code example number to alphabet converter in python code example c# loop through dictionary objects code example how to get first decimal from float in java script code example

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy