EN
JavaScript - get supported min integer value
3
points
In this article, we would like to show you how to get supported min integer value in JavaScript.
Quick solution:
JavaScript supports 53 bits integer numbers when we work on number type.
-9007199254740991
(in dec)===
-11111111111111111111111111111111111111111111111111111
(in bin)
const minValue = Number.MIN_SAFE_INTEGER; // -9007199254740991
Practical example
In this example, we print in the console the Number.MIN_SAFE_INTEGER
constant that represents the minimum safe integer in JavaScript.
// ONLINE-RUNNER:browser;
console.log(Number.MIN_SAFE_INTEGER); // -9007199254740991
Output:
-9007199254740991