Map
purpose: Transform every item in an array, and return's a new array.Filter
filter select items that meet a condition, and return's the new array.
3.Reduce
reduce combine multiple value into one result, and return one value.
Find
It find's the first item that meet a condition, and return's the item or undefined.Sort
sort arranges items in a particular order, and return's the sorted array.
Easy way to remember:
map - Transform
filter - select many
find - find one
reduce - combine
sort - arrange
Top comments (0)