I encountered this code today:
b = setTimeout(function () {
// do some javascript stuff here
}, 8e3)
The timeout is set to 8e3
8e3
is exactly 8000
, so the time is exactly 8 seconds.
This could be chosen (eg. by some code minifiers) because it takes exactly 3 characters instead of 4 to represent 8000
. Which means you gain 25% in terms of space in this single place :)
And this is not "strange" notation, it is just another way of expressing numbers: Floating point notation