JavaScript Array Methods
map, filter, reduce and friends — chosen right, first try.
Loading rating…
199 Xeem / 30 daysXeem — earned, never bought. Show up daily on waxeem.com and unlocking stays free.
Peek inside — 3 of 156 cards
Keep only items that pass a test?
.filter(fn) — returns a new array
[1,2,3].reduce((a,b) => a+b, 0)
6
Does .sort() mutate?
Yes — it sorts in place (and coerces to strings by default!)
About this deck
Every array method that matters, drilled by use-case: 'I want the first match' → find, 'I want to know if any match' → some, 'I want one value out of many' → reduce. Front is the situation, back is the method and a one-line example.
Covers the mutation traps too — which methods change the array, which copy it — the bug class that costs juniors their afternoons.
Ratings & feedback
Loading feedback…