Number.isSafeInteger()
Number.isSafeInteger() is a JavaScript method in the Number category. Determines whether a value is a safe integer. The syntax is Number.isSafeInteger(value). A typical example: Number.isSafeInteger(9007199254740991) // true. A close sibling is Number.prototype.toFixed(), which formats a number using fixed-point notation. A close sibling is Number.prototype.toExponential(), which returns a string in exponential notation. A close sibling is Number.prototype.toPrecision(), which returns a string with specified precision. A close sibling is Number.prototype.toString(), which returns a string in the specified radix (base). More about this category: Number methods for numeric operations — toFixed, parseInt, isNaN, and more. Related Number methods: Number.prototype.toFixed(), Number.prototype.toExponential(), Number.prototype.toPrecision(), Number.prototype.toString(), Number.isNaN(), Number.isFinite(), Number.isInteger(), Number.parseFloat(). This page is part of the free JS Reference documentation covering 1027+ methods, each with syntax, parameters, return values, examples, and common pitfalls. You can try Number.isSafeInteger() immediately in the JavaScript playground, look up unfamiliar terms in the glossary, or return to the JS Reference homepage.