I’m going through another nodeschool.io elective workshopper on functional programming in javascript. I understand how to work with a lot of the array functions, e.g., filter, map, every, but reduce was pretty confusing. I mean, it was easy enough to understand how to reduce an array of numbers to a single value, but I wasn’t super clear on how to use reduce when passing in an object literal as the initial value of the accumulator. I looked at the documentation, console logged where I could, but was still scratching my head at the end of the night.
This morning I found this video (no embed though, sorry!), and I think I finally get it. Cheers to that! The whole video is pretty useful, but ~2:50 is what I needed.














