1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Array reduce vs chaining vs for loop

    javascriptJavaScript
    nodeNode.js

    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.

    Code

    Code

    Become a Member to view code

    You must be a Pro Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    orLog In
    Discuss

    Discuss