I really don't understand this challenge

Tell us what’s happening:

I do not know where to start. I looked at the solutions because I have no clue whatsoever. how is ‘this’ set to the array? I tried reading the documentation, but MDN uses complicated jargon to explain anything decently. And not to mention how does the callback even work? it needs an item, but how can you find the value to pass in?

I understand how maps work but the internal logic boggles my mind.

Challenge: Implement map on a Prototype

Link to the challenge:

this is a special keyword that has a value depending on environment, in this case it has value of the array the method is used on (in this specific case, a value of s)

all the list of values that this can take depending on environment is here:

The situation of this challenge is described in As an object method paragraph


the callback is a function, you can call it like callback(e) (where instead of e you write the thing the callback needs to work on, in this case one of the array items


you need to pass in the array items, and do something with that
can you describe what map does to an array? maybe that can gives you some idea on what to do with those

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.