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
1 month ago
104,295 views
0 shares

javascript-memes, type-coercion-memes, brendan-eich-memes, programming-quirks-memes, string-comparison-memes | ProgrammerHumor.io
More Like This
Weekend
2 years ago
32.9K views
0 shares

Stop Doing NaNs
1 month ago
72.8K views
0 shares

Industry Cheat Sheet
2 years ago
84.7K views
0 shares

What She Did Was Correct Ibelieve
11 months ago
39.3K views
0 shares

As Afull Stack Dev
1 year ago
47.5K views
0 shares

struct node
1 year ago
22.4K views
0 shares

Loading more content...