Chooce video playback speed
speed:1

Array reduce vs chaining vs for loop

InstructorKent C. Dodds

Share this video with your friends

Send Tweet

I had a little NodeJS script I wrote to do a quick task for myself and in this video I'll show you a comparison of different approaches to operating on an array, specifically the Array reduce method vs chaining filter and map calls, and finally iterating over the array using a regular for loop. You'll learn why I recommend chaining most of the time.

This lesson is a Community Resource

A Community Resource means that it’s free to access for all. The instructor of this lesson requested it to be open to the public.

xAmber
xAmber
~ 5 years ago

Nice explanation 👌, what's the font u r using ?

Jakob
Jakob
~ 5 years ago

could also have done map(trim)