Javascript Number.MIN_SAFE_INTEGER

Introduction

The Javascript Number.MIN_SAFE_INTEGER represents the minimum safe integer in JavaScript.

To represent integers smaller than this, use BigInt.

The MIN_SAFE_INTEGER constant has a value of -9,007,199,254,740,991.

console.log(Number.MIN_SAFE_INTEGER); // -9007199254740991
let a = -(Math.pow(2, 53) - 1);
console.log(a);                       // -9007199254740991



PreviousNext

Related