Loading homepage
Implement arrayMap to recreate the core behavior of Array.prototype.map using a loop. Work with a standalone function that receives the array as its first argument.
Input: arrayMap([1, 2, 3], value => value * 2) Output: [2, 4, 6]
Input: arrayMap([], value => value) Output: []
arrayMap(array, callback, thisArg?) — standalone equivalent for arrays.