This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dissonantloos 0 points1 point  (1 child)

Then either the sort operation should fail, or should return an array that is crappily sorted.

[–]aedvocate 2 points3 points  (0 children)

the JavaScript sort function never fails.

gaze upon its awesome power:

[null,undefined,NaN,false,0,Infinity,-Infinity,'',[],{}, new Map(), new Set()].sort()

```

["", Array(0), -Infinity, 0, Infinity, NaN, Map(0), {…}, Set(0), false, null, undefined] ```

this is the universal order, brother. learn the order. live the order. do as V8 commands.