Example 1 — Read Number.POSITIVE_INFINITY
Confirm it matches the global Infinity literal.
console.log(Number.POSITIVE_INFINITY);
console.log(Number.POSITIVE_INFINITY === Infinity);
console.log(1 / 0); How It Works
- Static access. Read
Number.POSITIVE_INFINITYon the constructor. - Same bits. It equals the global
Infinityvalue. - Division form.
1 / 0is a common way to produce the same value. - Not a method. There is no
(1).POSITIVE_INFINITY.

