Numeric Separators

Numeric Separators

Shubham Battoo
1 min read

Reading large numbers is difficult most of the time, using the latest proposal for Numeric Separators is going to make this job easy.

For example, say you have the following number:

let budget = 1000000000;

It's hard for the human eye to detect what is the actual order in here.

But, by using the Numerical Separators, it can be rewritten in the following way:

let budget = 1_000_000_000;

We can easily tell by separating them with underscores that this is a billion.

Support

There is fairly good support for this feature in the latest browsers:

Found it very neat.

Further Learning

Continue the discussion on DEV