News for hackers. Stuff that matters.
Re:The Everything NPM Package by paulddraper on Sunday January 07, 2024 @01:45AM (#38899088)
> since sorting is already in the standard library

Right. For example, to sort a list of numbers:

  [5, 14, 1, 2].sort()
Works great! No, wait, that's obviously wrong. Uh,

  [5, 14, 1, 2].sort((a, b) => a - b)

There are no comments on this comment yet.