Numbers: Underscores in numbers

Join the AI Workshop to learn more about AI and how it can be applied to web development. Next cohort February 1st, 2026

The AI-first Web Development BOOTCAMP cohort starts February 24th, 2026. 10 weeks of intensive training and hands-on projects.


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 for years.

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

Lessons in this unit:

0: Introduction
1: Number Basics
2: Number Validation
3: Parsing Numbers
4: Formatting Numbers
5: Number Recipes
6: The Binary Number System
7: ▶︎ Underscores in numbers
8: The Decimal Number System
9: Converting Numbers from Decimal to Binary