Courses / JavaScript
74. Array.prototype.map()
Creating a new array with the results of calling a provided function on every element.
1 min read Chapter 74 of 99
JavaScript
Array.prototype.map()
Array.prototype.map() creates a new array by applying a function to each element of an existing array.
"I want to transform my list of numbers without writing a loop."
Array.prototype.map() takes a callback function and applies it to each element of an array, returning a new array with the results.
"I want to transform my list of numbers without writing a loop."
Array.prototype.map() takes a callback function and applies it to each element of an array, returning a new array with the results.