1×
Become a member
to unlock all features
Autoplay

    Use the Optional Reduce Arguments

    javascriptJavaScript

    Sometimes we need to turn arrays into new values in ways that can't be done purely by passing an accumulator along with no knowledge about its context. Learn how to reduce an array of numbers into its mathematical mean in a single reduce step by using the optional index and array reducer arguments.