ES6+beginner
Numeric Separators and New Number Methods
Underscore separators for readable large numeric literals, plus static Number methods that avoid relying on global functions with looser coercion.
Numeric separators and several Number-namespaced static methods are smaller, quality-of-life additions to how JavaScript handles numbers, showing up often enough in modern code to be worth knowing precisely.
Numeric separators are like writing '1,000,000' instead of '1000000' on a whiteboard — purely for the human reading it. The strict Number methods are a bouncer who checks you're holding a real ticket before considering whether it's valid, rather than a lenient doorman who'll accept a scribbled note and try to interpret it.
Key Concepts
1
Numeric separators let you insert underscores into numeric literals purely for readability, with zero effect on the value: 1_000_000 is exactly the same number as 1000000. This works across integers, decimals, and other bases like hex, and the underscores are stripped entirely at parse time.
2
On the methods side, Number.isFinite(value) is a stricter, non-coercing counterpart to the global isFinite(), which coerces its argument to a number first. Number.isFinite('123') is false since it strictly checks the value is already type number, with no coercion. The same distinction applies to Number.isNaN() versus the global isNaN().
3
Number.parseInt() and Number.parseFloat() are simply namespaced aliases for the identical global parseInt/parseFloat functions — they behave exactly the same, existing purely for namespace consistency, not any behavioral difference.