r/programminghorror • u/enmaku • Dec 04 '25
This sub in a nutshell
console.log(1 == '1'); // true
console.log(0 == false); // true
console.log(null == undefined); // true
console.log(typeof null); // "object"
console.log(0.1 + 0.2); // 0.30000000000000004
[] == ![]; // trueOMG you guys what weird quirky behavior, truly this must be the single quirkiest language and no other language is as quirky as this!
1.1k
Upvotes
View all comments
Show parent comment
26
u/the_horse_gamer Dec 04 '25
javascript wasn't meant to build large apps. or god forbid, backends. it was meant to add some interactivity to a website. so the distinction between 123 and "123" didn't matter much when reading user input.
ofc, the situation is very different in the modern day
and it didn't help that the language was designed with a tight deadline.