November 2017
Intermediate to advanced
386 pages
9h 22m
English
The complementary .reduceRight() method works just as reduce, only starting at the end and looping until the beginning of the array. For many operations (such as the calculation of averages that we saw previously) this makes no difference, but there are some cases in which it will.
We shall be seeing a clear case of this in Chapter 8, Connecting Functions - Pipelining and Composition, when we compare pipelining and composition: let's go with a simpler example here:

Read now
Unlock full access