You must log in or register to comment.
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
More like javascript L, even python would throw a TypeError for this example.
And to further expand on that, if you do pass in a
stingstring, it handles it correctly.> parseInt('0.0000005') 0
What if I pass in a Stewart Copeland?
😆 I’ll be watching you…
or a Honda civic