Learn JavaScript
Advanced Array Methods
31.9
Lesson

map()

The map() method executes a function for each array element, stores the result in a new array and returns that array.

In the example given above, the map method returns the product of each element of the evenNumbers array.