336
parseInt(5)
(lemmy.ml)
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
It's because parseInt is expecting a string, so the decimal gets converted to a string, and
0.0000005.toString()
returns5e-7
.Common Dynamic Typing L
And to further expand on that, if you do pass in a ~~sting~~ string, it handles it correctly.
What if I pass in a Sterwart Copeland?
or a Honda civic
๐ I'll be watching you...