forEach() vs. map() - What’s the Difference?4:14 with Dustin Usey
Have you ever needed to loop over an array and weren't sure which method to use? At first, forEach() and map() can seem to do the same thing, right? So which one do you choose and what is the difference between them? In this quick guide, Dustin goes over one thing that sets these two methods apart. If you're unfamiliar with forEach() or map() and would like to learn more, check out the guides in the notes below.
You need to sign up for Treehouse in order to download course files.Sign up