From 5f73e0572894d4a7133e349f72055c66762cfddc Mon Sep 17 00:00:00 2001 From: gs20060101 Date: Tue, 31 May 2016 10:22:04 -0700 Subject: [PATCH] Remove unnecessary arguments The function "fn" is a user-supplied function that would not take "index" and "arr" arguments. --- exercises/implement_map_with_reduce/solution/solution.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }, []) }