AI Workshop: learn to build apps with AI →
Numbers: Underscores in numbers

Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.


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