back

by sarreph·5y ago·view on hn ↗
You can also write JavaScript numbers with E notation (i.e. multiplied by 10 to the power of x), which is basically what I do with all numbers above 1,000 or below 0.001 now. It has the rare benefit, for big / small numbers, of being both more readable and more concise.

Example:

1e3 === 1000;

1e-3 === 0.001;

45.2e6 === 45200000;