Scientific notation literal in Javascript
Today I Learned that there is a thing called “scientific notation literals” in Javascript. Let’s see some examples.
1e10; // returns 10000000000
2e4; // return 20000
2.5e2; // Also with floats! returns 250
This method might prove useful to describe certain amount of numbers.
Mar 8, 2018