Example 1 — Read Number.MAX_VALUE
Print the largest finite Number and confirm it is finite.
console.log(Number.MAX_VALUE);
console.log(Number.isFinite(Number.MAX_VALUE)); How It Works
- Static access. Read
Number.MAX_VALUEon the constructor — there is no(5).MAX_VALUE. - Huge but finite. The printed value is about
1.8e+308. - Still a Number.
Number.isFinitereturnstrue— this is notInfinityyet. - Prefer the name. Use the constant instead of hard-coding the literal.

