this post was submitted on 21 Jul 2023
83 points (96.6% liked)
Programming Humor
2763 readers
3 users here now
Related Communities [email protected] [email protected] [email protected] [email protected]
Other Programming Communities [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
From MDN:
So, if you're trying to sort numbers,
[6, -2, 2, -7].sort((a, b) => a - b)
That might be explainable, but doesn't make it logical or acceptable.