r/javascript • • Jul 09 '21

JavaScript is weird. (QUIZ)

https://jsisweird.com/

[removed] — view removed post

8 Upvotes

5 comments sorted by

9

u/reqdk Jul 09 '21

Ah yes, the old "0.1 + 0.2 === 0.3" meme. Learn computers before learning JS thx.

1

u/Careless-Honey-4247 Jul 09 '21

Some kind 0.1 + 0.2 = 0.300000000000000004

5

u/exonac Jul 09 '21

This is why I only use the good parts of javascript. Never use == and always explicitely convert to types.

1

u/Careless-Honey-4247 Jul 09 '21

Thank for sharing this mega brutal

1

u/madcaesar Jul 09 '21

Brutal! But fun! Thanks for sharing!