JS Built-ins
NumberMAX_SAFE_INTEGERbeginner

Number.MAX_SAFE_INTEGER β€” type

πŸ“– Usage Example
// Largest safely representable integer
Number.MAX_SAFE_INTEGER   // β†’ 9007199254740991
Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2   // β†’ true (unsafe!)

Use Number.MAX_SAFE_INTEGER as the upper bound when working with integers to avoid silent precision loss.

Type of MAX_SAFE_INTEGER

Verify the type of Number.MAX_SAFE_INTEGER.

πŸ’‘ Hints (1)
  • β€’ `MAX_SAFE_INTEGER` is a regular `number` constant.