Lodash: Refactoring Simple For Loops

InstructorJohn Lindquist

Share this video with your friends

Send Tweet

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.

Gregory Pierce
~ 9 years ago

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 :)