Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to check if a number is a whole number in javascript

// how to check if a number is a whole number in javascript
console.log(Number.isInteger(123)); // true
console.log(Number.isInteger(123.123)); // false
 
PREVIOUS NEXT
Tagged: #check #number #number #javascript
ADD COMMENT
Topic
Name
3+7 =