isSafeInteger()

Description :

This method is same as isInteger() method used to check whether the given value is number or not. But the only difference is, it will check the integer value with in this range (253-1) to -(253-1). If it is fail to fall with in this range, then it returns false.

It checks only for digits (both negative and positive whole numbers) and not decimals.

But still it accepts xxx.0 as a valid one.

Also if you give the valid number enclosed with single or double quotes, still it says invalid and returns false.

Syntax :

Number.isSafeInteger(value)

Input Parameters :

value
The value to be tested

Return Values :

Returns true if it is number otherwise returns false


Test this method :

Test Result :   
Your Code :