4 ms·
via MDN: "The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values." [
by ksherlock 3y ago
via MDN:
"The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values."
[1, 99, 100] would also sort non-numerically, no negatives necessary.
- behnamoh 3y agoThis is insane!
- bencelaszlo 3y agoWhat is so insane about the alphabetical order?