Numeric separators
To improve readability for numeric literals, underscores (_) can be used as separators. For example, 1_050.95 is equivalent to 1050.95.
Overview
To improve readability for numeric literals, underscores (_) can be used as separators. For example, 1_050.95 is equivalent to 1050.95.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 75 | 79 | 70 | 13 | 75 | 13 | |
1+Supported (version) Not supported ※Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Syntax
JAVASCRIPT
const billion = 1_000_000_000;
const bytes = 0xFF_FF_FF;
const float = 1_234.567_89;
const binary = 0b1010_0001;
console.log(billion); // 1000000000 Live demo
big number. allowread
anda-score in blockcutnumber that, programutop in is normal. Number and and inspect it..
PreviewFullscreen
number. separe-ta
numberdot or less. digitnumber that case in also, separatorcharacter Usesplit or or write..
PreviewFullscreen
Use cases
Using Numeric separators
To improve readability for numeric literals, underscores (_) can be used as separators. For example, 1_050.95 is equivalent to 1050.95.
Cautions
- No specific concerns. Stable across all major browsers.
Accessibility
- When updating the DOM dynamically, announce important changes to assistive technology with aria-live regions.
Related links
Powered by web-features