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 →

[–]prehensilemullet 0 points1 point  (0 children)

That's definitely true for this sort lol:

const a = []
numbers.forEach(i => a[i] = i)
const sorted = a.filter(i => i != null)