how to chck if number is integer in js code example
Example 1: javascript is number an integer
Number.isInteger(value)
//returns a Boolean
Example 2: To check if a value is a number in JavaScript
const value = 2
isNaN(value) //false
isNaN('test') //true
isNaN({}) //true
isNaN(1.2) //false