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
5 months ago
194,616 views
0 shares
javascript-memes, type-coercion-memes, brendan-eich-memes, programming-quirks-memes, string-comparison-memes | ProgrammerHumor.io
More Like This
The Semicolon: Optional In English, Mandatory In Code
7 months ago
219.3K views
0 shares
We can buy additional vacation days now.
2 years ago
77.0K views
0 shares
Login Logic
8 months ago
261.9K views
0 shares
Finland has no regards to human rights
3 years ago
83.4K views
0 shares
A Good Info Graph Does Not Ex
1 year ago
205.3K views
1 shares
;)
2 years ago
46.3K views
0 shares
Loading more content...
AI
AWS
Agile
Algorithms
Android
Apple
Bash
C++
Csharp