Open In App

JavaScript Number.MIN_SAFE_INTEGER Property

Improve
Improve
Like Article
Like
Save
Share
Report

The JavaScript Number.MIN_SAFE_INTEGER is a constant number that represents the minimum safe integer. This constant has a value of (-(253 – 1)).

Use Number.MIN_SAFE_INTEGER, as a property of a number object because it is a static property of a number.

Syntax:

Number.MIN_SAFE_INTEGER

Return Value: Constant number.

Example 1: Below example illustrates the use of simple Number.MIN_SAFE_INTEGER property.

Javascript




const a = Number.MIN_SAFE_INTEGER - 1;
const b = Number.MIN_SAFE_INTEGER - 2;
  
console.log(Number.MIN_SAFE_INTEGER);
console.log(a);
console.log(a === b);


Output:

-9007199254740991
-9007199254740992
true

Example 2: Below example illustrates the usage of Number.MIN_SAFE_INTEGER property using Math.pow() function.

Javascript




const c = Number.MIN_SAFE_INTEGER;
const d = -(Math.pow(2, 53) - 1);
  
console.log(c);
console.log(d);
console.log(c === d);


Output:

-9007199254740991
-9007199254740991
true

Note: Internet explorer is not supported.

Supported Browsers:

  1. Chrome 34 and above
  2. Edge 12 and above
  3. Firefox 31 and above
  4. Opera 21 and above
  5. Safari 9 and above

We have a complete list of JavaScript Number constructor, properties, and methods list, to know more about the numbers please go through that article.


Last Updated : 23 May, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads