3 ms·
Have you ever wanted to call .map() on an array? Or sort with a custom comparison function?
by pcwalton 9y ago
Have you ever wanted to call .map() on an array? Or sort with a custom comparison function?
- SamReidHughes 9y agoSorting you can do -- the function takes indices. And no, I've never wanted to call .map() -- I love writing for loops over and over, it feels really productive.