Skip to content
FLAVIO COPES
flaviocopes.com
2026

Underscores in numbers

~~~

TIL you can add underscores in the middle of any number in JavaScript, to improve its readability according to what the number means to you:

1_000 //1000
2_3_4 //234 

It’s a relatively new feature (since ECMAScript 2021), but supported by all major browsers since years.

See https://v8.dev/features/numeric-separators

~~~

Related posts about js: