memesearch
JavaScript Comparison Logic

JavaScript Comparison Logic

Download Find similar pictures
Text on the meme
Ok JavaScript, 3 < 2 Isn’t this statement false? Yup 2 < 1 And this is false? Yup 3 < 2 < 1 So this must be false? That makes sense to me console.log(3<2<1); true
What it means

A JavaScript programmer presents increasingly confusing chained comparisons to Patrick Star, who agrees that the final expression is true. The joke is that JavaScript evaluates chained comparisons from left to right: 3 < 2 becomes false, and false is coerced to 0, making 0 < 1 true. EN: A JavaScript programmer presents increasingly confusing chained comparisons to Patrick Star, who agrees that the final expression is true. The joke is that JavaScript evaluates chained comparisons from left to right: 3 < 2 becomes false, and false is coerced to 0, making 0 < 1 true.

Who
Objects
Tags
Source
Template
Patrick Star Yup
Type
image
Size
643×800 · 110.5 KiB
Mood
absurd, ironic
Language
en
Added