Javascript Number isInteger() Example | Number.isInteger() Function is today’s topic. The Number.isInteger() method resolves whether the passed value is an integer. The isInteger() method returns true if the value is of the type  Number, and an integer (a number without decimals). Otherwise, it returns false. The isInteger() method is not supported in Internet Explorer 11 and earlier versions.

Javascript Number isInteger()

The syntax of the function is following.

Number.isInteger(value)

The value parameter is required, and it is a value that needs to be tested.

If the target value is the integer, return true, otherwise, it returns false.

If a value is NaN or Infinity, it returns false. The method will also return true for floating-point numbers that can be represented as an integer.

#javascript #js

Javascript Number isInteger() Example | Number.isInteger() Function
2.05 GEEK