What is the purpose of `Array.prototype.map()`?

JavaScript Associate Easy

JavaScript Associate — Easy

What is the purpose of `Array.prototype.map()`?

Key points

  • `map()` creates a new array
  • It applies a function to each element
  • It does not filter elements
  • It does not reduce the array to a single value
  • It does not find the first matching element

Ready to go further?

Related questions