Javascript Trick — Use Exponential Number Notations
1 min readSep 28, 2020
Shorten code for decimal numbers using exponential notation instead of 0s
In javascript, N number of 0s after a number can be replaced with eN
Example:
5e4 = 50000
7e2 = 700
7e0 = 7
7e1 = 70
Read more: https://blog.nordible.com/Javascript-Trick-Use-Exponential-Number-Notations/