Array methodsbeginner
map, filter, find and reduce replace almost every loop you would otherwise write — knowing which one returns what is the single highest-leverage thing in JavaScript.
The three operations behind every table you will ever build, and the traps in each.
Search, filter and sort all behave, and the caller's array comes back untouched.
Published in full, before you start — every point is one of these and there is nothing else. Each one runs your code; it is not a search for keywords.
map, filter, find and reduce replace almost every loop you would otherwise write — knowing which one returns what is the single highest-leverage thing in JavaScript.
sort() and reverse() change the array you gave them, which is how a filter quietly reorders the caller's data — copy first, and the bug never exists.