The function assumes a finite number. If provided positive or negative infinity, the function will return true, when, in fact, the result is undefined.
Parameters
x: number
value to test
Returns
boolean
boolean indicating whether the value is an integer
Tests if a finite double-precision floating-point number is an integer.
Notes
true
, when, in fact, the result is undefined.