/

HTML / CSS / JavaScript Tutorial

JavaScript Number method: isSafeInteger()

[this page | pdf | back links]

The isSafeInteger() method (of the JavaScript Number object) returns true if value is of type Number and is a safe integer, otherwise false. A safe integer is one that can be exactly represented as an IEEE-754 double precision number, i.e. is an integer in the range -(253 - 1) to (253 - 1).

 

It has the following syntax with the following parameters:

 

Number.isSafeInteger(x)

 

Parameter

Required / Optional

Description

x

Required

Input parameter

 


NAVIGATION LINKS
Contents | Prev | Next | JavaScript Numbers and Math


Desktop view | Switch to Mobile