4 ms·
> 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 obviou
by paulddraper 3y ago
> 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)