The difference between 1 and the smallest floating-point number greater than 1 representable in a Number, approximately 2^-52.
Reference
Number
Number type, constants, and parsing functions.
- Number.EPSILON
- Number.isFinite()
Number.isFinite() returns true for finite numbers, false for Infinity, -Infinity, NaN, and non-number types, without the type coercion of global isFinite().
- Number.isInteger()
Number.isInteger() determines whether a value is a finite integer with no fractional component. Returns false for floats, NaN, Infinity, and non-number types.
- Number.isNaN()
Number.isNaN() tests if a value is exactly NaN without type coercion. Covers the global isNaN() difference, NaN in arithmetic, and the NaN !== NaN quirk.
- Number.MAX_SAFE_INTEGER
`Number.MAX_SAFE_INTEGER` is the largest safe integer in JavaScript (2^53 - 1 = 9,007,199,254,740,991). Upper bound for IEEE-754 doubles that compare exactly.
- Number.parseFloat()
Number.parseFloat() parses a string and returns a floating-point number, identical to the global parseFloat() function. Added in ES6 for global modularization.
- Number.parseInt()
Number.parseInt() parses a string and returns an integer in the given radix. Identical to the global parseInt, exposed on the Number namespace since ES2015.
- Number.prototype.toFixed()
Number.prototype.toFixed() returns a string with fixed decimal places. Essential for currency, percentages, and consistent numeric display.
- Number.prototype.toPrecision()
Number.prototype.toPrecision() formats a number to a specified number of significant digits. Suited for scientific data where precision matters.
- Number.prototype.toString()
Number.prototype.toString() converts a number to a string in any radix from 2 to 36, supporting binary, octal, hex, and custom base representations.