Scientific notation literal in Javascript

  Mar 8, 2018
  Loading comment count
 javascript, notation 

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.