Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check if string only contains integer digits numbers javascript

let val = '1234567890' 
let isnum = /^d+$/.test(val);
if (isnum) {
  // val is a number
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #string #integer #digits #numbers #javascript
ADD COMMENT
Topic
Name
6+3 =