The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Advanced Reduce: Additional Reducer Arguments

Advanced Reduce: Additional Reducer Arguments

4:47
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.
Watch this lesson now
Avatar
egghead.io

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.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?