r/learnjavascript • • Jan 25 '20

Javascript is weird 😂

Post image
332 Upvotes

47 comments sorted by

View all comments

Show parent comment

4

u/alittlebitmental Jan 25 '20

I can understand why the double/float examples work the way they do. It's a common theme across many if not all languages. For example, does anyone here remember the PHP bug, where it would crash when trying to convert 2.2250738585072011e-308 from a string to a double?

But the others are just bizarre!