September 2018
Intermediate to advanced
302 pages
7h 17m
English
This section is aimed at refreshing our knowledge on the map, filter, and reduce functions.
reduce is most likely often neglected, hence, we will focus on it. Usually, reduce (as the name suggests) is used to reduce a collection in size to a smaller one, or even a single variable.
Here is the reduce function declaration:
reduce(callback, [initialValue])
The callback takes four arguments: previousValue, currentValue, index, and array.
To quickly remind you how the reduce function ...
Read now
Unlock full access