memesearch
JavaScript sort() UTF-16 Moment

JavaScript sort() UTF-16 Moment

Download Find similar pictures
Text on the meme
The sort() method sorts the elements of an array in place and... ...then comparing their sequences of UTF-16 code units values. > [6, -2, -7, 9].sort() < ▸ (4) [-2, -7, 6, 9]
What it means

A four-panel meme uses Mr. Incredible’s increasingly unsettling expressions to explain JavaScript’s sort() method. The punchline is that numbers are sorted lexicographically by UTF-16 code units by default, so the result is based on string ordering rather than numerical value. EN: A four-panel meme uses Mr. Incredible’s increasingly unsettling expressions to explain JavaScript’s sort() method. The punchline is that numbers are sorted lexicographically by UTF-16 code units by default, so the result is based on string ordering rather than numerical value.

Who
Objects
Tags
Source
Template
Mr. Incredible Becoming Uncanny
Type
image
Size
780×724 · 40.0 KiB
Mood
absurd, unsettling
Language
en
Added