Array.prototype.map() - MDN Web Docs
https://frost.cs.uchicago.edu/ref/JavaScript/developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map.html
Web1. var array1 = [1, 4, 9, 16]; 2. 3. // pass a function to map. 4. const map1 = array1.map(x => x * 2); 5. 6. console.log(map1); 7. // expected output: Array [2, 8, 18, 32] 8. Run ›. Reset. Syntax. var new_array = arr .map(function callback(currentValue[, index[, array]]) { // Return element for new_array . } [, thisArg ]) Parameters.
DA: 58 PA: 4 MOZ Rank: 17