ES6 - Number.isSafeInteger()


Advertisements

The Number.isSafeInteger() method determines whether the passed value is a safe integer.

Syntax

var res = Number.isSafeInteger(value);

Parameter Details

Value to be tested for for being a safe integer.

Return Value

Returns a Boolean value, true or false.

Example

var res = Number.isSafeInteger(10); 
console.log(res); 

Output

true
es6_number.htm
Advertisements