Answers for "js check variable is integer"

18

javascript is number an integer

Number.isInteger(value)

//returns a Boolean
Posted by: Guest on January-18-2020
1

javascript check if a value is a integer number

Number.isInteger(123) //true
Number.isInteger(-123) //true
Number.isInteger(5-2) //true
Number.isInteger(0) //true
Number.isInteger(0.5) //false
Number.isInteger('123') //false
Number.isInteger(false) //false
Number.isInteger(Infinity) //false
Number.isInteger(-Infinity) //false
Number.isInteger(0 / 0) //false
Posted by: Guest on March-30-2020

Code answers related to "js check variable is integer"

Code answers related to "Javascript"

Browse Popular Code Answers by Language