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

Lodash: Refactoring Simple For Loops

Lodash: Refactoring Simple For Loops

3:44
This lesson shows how to refactor your old loops into using a simpler and more powerful lodash-style. We will start by looking at how many people traditionally write JavaScript `for` loops and then talk about the alternate style and benefits that Lodash offers.
Watch this lesson now
Avatar
egghead.io

This lesson shows how to refactor your old loops into using a simpler and more powerful lodash-style. We will start by looking at how many people traditionally write JavaScript for loops and then talk about the alternate style and benefits that Lodash offers.

Avatar
Gregory

Appreciate the demo, but it would have been far more useful if you would have taken it beyond the extremely simple single property case.

Ideally you wouldn't look for the "first" Susan or the "last" Susan because that breaks depending on how your data is structured. You really should be looking at how do I find the "Susan with age 10". Same with sorting and any other sort of thing. Very rarely will you have simple requirements to just sort on a single property :)

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