memesearch
JavaScript Sorting Surprise

JavaScript Sorting Surprise

Download Find similar pictures
Text on the meme
I want to learn JavaScript > [10, 9, 8, 3, 2, 1, 0].sort() [0, 1, 10, 2, 3, 8, 9]
What it means

A medieval monk appears to be teaching a lion, with speech bubbles showing someone learning JavaScript and discovering that the default sort produces the lexicographic order [0, 1, 10, 2, 3, 8, 9]. The joke is that JavaScript sorts numbers as strings unless a comparison function is provided, making this a reaction image for confusing or frustrating programming behavior.

Who
Objects
Tags
Source
Type
image
Size
800×800 · 178.6 KiB
Mood
confused, absurd
Language
en
Added