151. implement Array.prototype.map()

JavaScript
Is this helpful ?

from all members: - accepted / - tried

Please implement your own Array.prototype.map().

[1,2,3].myMap(num => num * 2)
// [2,4,6]

please avoid using Array.prototype.map() directly in your code.

Let's try to solve this problem within 10 mintues.

Discuss(15)