Copyright 2025

The Valley of Code

A Flavio Copes project

Underscores in numbers
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


Want to master TypeScript? Check out my TypeScript Masterclass

Join my AI Workshop !

The Web Development BOOTCAMP cohort starts in February 2026