JS - Arrays and Functional Methods

Arrays store ordered collections of values. Functional array methods are used to loop, transform, filter, and reduce arrays.

Core Notes

Method Summary

MethodReturnsUse when
forEach()undefineddoing something for each item
map()new arraytransforming each item
filter()new arraykeeping matching items
reduce()one valueaccumulating into a total/object/string
sort()sorted original arrayordering items

Practice