memesearch
JavaScript Sort Betrayal

JavaScript Sort Betrayal

Download Find similar pictures
Text on the meme
Welcome to Node.js v16.20.0. Type ".help" for more information. > [1, 2, 10].sort() [ 1, 10, 2 ] >
What it means

A Node.js terminal shows the array [1, 2, 10] being sorted into [1, 10, 2]. The joke is that JavaScript's default sort compares values as strings, producing an unexpected result that surprises or frustrates programmers. It is commonly sent as a reaction to confusing programming bugs or JavaScript quirks.

Objects
Tags
Source
Template
JavaScript console screenshot
Type
image
Size
562×184 · 10.3 KiB
Mood
алгоритмичный юмор
Language
en
Added