
JavaScript: From Fundamentals to Functional JS, v2 _.map() Exercise, Part 2
This course has been updated! We now recommend you take the JavaScript: From First Steps to Professional course.
Transcript from the "_.map() Exercise, Part 2" Lesson
[00:00:00]
>> 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.
>> [BLANK AUDIO]