diff --git a/exercises/implement_map_with_reduce/solution/solution.js b/exercises/implement_map_with_reduce/solution/solution.js index 170e47f..7855ff7 100644 --- a/exercises/implement_map_with_reduce/solution/solution.js +++ b/exercises/implement_map_with_reduce/solution/solution.js @@ -1,6 +1,6 @@ module.exports = function arrayMap(arr, fn, thisArg) { - return arr.reduce(function(acc, item, index, arr) { - acc.push(fn.call(thisArg, item, index, arr)) + return arr.reduce(function(acc, item) { + acc.push(fn.call(thisArg, item)) return acc }, []) }