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
2 months ago
137,853 views
0 shares

javascript-memes, type-coercion-memes, brendan-eich-memes, programming-quirks-memes, string-comparison-memes | ProgrammerHumor.io
More Like This
How To End A Frontend Developer's Career
20 days ago
164.6K views
0 shares

copy pasting
4 years ago
59.4K views
0 shares

The Many Faces Of CSS
2 months ago
98.8K views
0 shares

Frontend of your website and the Backend of your website.
3 years ago
36.2K views
0 shares

Jr. Developer position near me…
3 years ago
131.0K views
0 shares

Electron With Extra Steps
4 months ago
187.0K views
0 shares

Loading more content...