mediumJS ES5#59

Array.map manually

Prompt

Implement your own version of Array.prototype.map as a standalone function myMap(arr, callback). It must return a NEW array (never mutate the input) and pass (element, index, array) to the callback.

Hints

Solution

Your Code

10 min

Tests

Click Run to test your code