# JavaScript Number.isSafeInteger() Method

You are Here:

## JavaScript Number.isSafeInteger() Method

The `Number.isSafeInteger()` method returns a Boolean value indicates whether the provided value is a number that is a safe integer.

Note: All integers from -(253 - 1) to (253 - 1) are safe integers.

### Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <script> var result = Number.isSafeInteger(9999999999999999); document.write(result); </script> </body> </html>

## Syntax

Number.isSafeInteger(value)

## Parameter Values

ValueTypeExplanation
valueRequiredThe value to be tested for being a safe integer.

## Return Value

ValueExplanation
trueIf the given value is a safe integer.
falseIf the given value is not a safe integer.

## More Examples

### Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <script> document.write(Number.isSafeInteger(25) +": 25 <br>"); document.write(Number.isSafeInteger(-987)+": -987 <br>"); document.write(Number.isSafeInteger(54 - 7)+": 54 - 7 <br>"); document.write(Number.isSafeInteger(Math.pow(2, 53) - 1)+": Math.pow(2, 53) - 1 <br><br>"); document.write(Number.isSafeInteger(Math.pow(2, 53))+": Math.pow(2, 53) <br>"); document.write(Number.isSafeInteger(5.2)+": 5.2 <br>"); document.write(Number.isSafeInteger(-25.5)+": -25.5 <br>"); document.write(Number.isSafeInteger(0 / 0)+": 0 / 0 <br>"); document.write(Number.isSafeInteger(true)+": true <br>"); document.write(Number.isSafeInteger(false)+": false <br>"); document.write(Number.isSafeInteger('65')+": '65' <br>"); document.write(Number.isSafeInteger([5])+": [5] <br>"); document.write(Number.isSafeInteger(Infinity)+": Infinity <br>"); document.write(Number.isSafeInteger(-Infinity)+": -Infinity <br>"); document.write(Number.isSafeInteger(null)+": null <br>"); </script> </body> </html>

## Reminder

Hi Developers, we almost covered 97% of JavaScript Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in JavaScript.