November 2019
Intermediate to advanced
336 pages
11h 30m
English
map() applies a function to each value of a range and returns the results of applying that function.
map(["apple", "orange", "peach"], (item) => item.length)

filter() applies a predicate to each value of a range and filters out the values for which the predicate is false.
filter(["apple", "orange", "peach"], (item) => item.length == 5)

reduce() combines the values of a range using a given function and returns a single value.
reduce(["apple", "orange", "peach"], "", (acc, item) => acc + item)
Read now
Unlock full access