This course has been updated! We now recommend you take the JavaScript: From First Steps to Professional course.

Check out a free preview of the full JavaScript: From Fundamentals to Functional JS, v2 course:
The " Exercise, Part 2" Lesson is part of the full, JavaScript: From Fundamentals to Functional JS, v2 course featured in this preview video. Here's what you'd learn in this lesson:

In this exercise, students implement function.

Get Unlimited Access Now

Transcript from the " Exercise, Part 2" Lesson

>> Bianca Gandolfo: So our next task is to implement map. What are some things we may want to consider when we're implementing map? What's the difference between when we implemented each?
>> Speaker 2: Map returns an array.
>> Bianca Gandolfo: Yup. Map returns an array. So we'll need to. Have a return statement in there somewhere.

[00:00:26] We'll need to create an array, perhaps, to store data. What's the same, what's similar?
>> Speaker 2: Iterates through each.
>> Bianca Gandolfo: Mm-hm, yeah, iterates through a list. Exactly. So, there's two ways you can do this, you guys are gonna hate me. But, the first way you can do it with a loop, right?

[00:00:55] Second way is that you can use each, instead of a loop, so. That's the task. Are you guys ready? Any questions before we get started?
>> Bianca Gandolfo: So we're gonna implement map just like we implemented each.