JavaScript's type coercion strikes again! In JS, when comparing strings with >
, it performs lexicographical comparison - meaning "Dog" > "Cat" evaluates to true
because 'D' comes after 'C' in the alphabet. The grumpy kitten represents Brendan Eich (JavaScript's creator) facepalming at his own language quirks. He unleashed these string comparison shenanigans on the world and now even cats are judging him for it. The feline uprising begins with alphabetical order!
Why Brendan Eich Created JavaScript's Quirky Comparisons
4 months ago
169,881 views
0 shares

javascript-memes, type-coercion-memes, brendan-eich-memes, programming-quirks-memes, string-comparison-memes | ProgrammerHumor.io
More Like This
Damn JavaScript
3 years ago
81.9K views
0 shares

JavaScript's Equality: A Horror Story
4 months ago
140.6K views
0 shares

The quickest way to tell if someone knows what they're doing.
3 years ago
95.6K views
1 shares

Floating points
2 years ago
58.4K views
0 shares

Should be r/FunnyAndSad probably.
1 year ago
86.1K views
0 shares

Rust Is More Strict Which Makes It More Secure
3 months ago
227.3K views
0 shares

Loading more content...