We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3587aa2 commit 0fa2cb3Copy full SHA for 0fa2cb3
easy/array-reduce-transformation.js
@@ -1,5 +1,5 @@
1
-const reduce = (nums, fn, init) => {
2
- nums.forEach((element) => {
+const reduce = (numbers, fn, init) => {
+ numbers.forEach((element) => {
3
init = fn(init, element);
4
});
5
return init;
0 commit comments