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
1
u/the_horse_gamer Dec 04 '25
"everything is an object" has always been a matter of marketing and isn't true in most OOP languages
never had to disambig
number | string?let me ask you this: what did you EXPECT
typeof [1, 2, 3]to be?ad hominem. I'm a low level dev and this is basic javascript knowledge.
sounds like you made mistakes learning a language and projected that as the fault of the language instead of you being a learner.