JS Built-ins
NumberMIN_SAFE_INTEGERintermediate

Number.MIN_SAFE_INTEGER β€” isSafeInteger at boundary

πŸ“– Usage Example
// Most negative safely representable integer
Number.MIN_SAFE_INTEGER   // β†’ -9007199254740991
Number.MIN_SAFE_INTEGER - 1 === Number.MIN_SAFE_INTEGER - 2   // β†’ true (unsafe!)

Use Number.MIN_SAFE_INTEGER as the lower bound when working with negative integers to avoid silent precision loss.

isSafeInteger at MIN_SAFE_INTEGER Boundary

Test Number.isSafeInteger at and around MIN_SAFE_INTEGER.

πŸ’‘ Hints (1)
  • β€’ Safe integers span from `MIN_SAFE_INTEGER` to `MAX_SAFE_INTEGER` inclusive.