We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49bc04b commit 1f70485Copy full SHA for 1f70485
1 file changed
src/arrays.js
@@ -36,7 +36,7 @@ const reduce = (elements, cb, memo) => {
36
}
37
38
for (i = 0; i < elements.length; i++) {
39
- totalAmount += cb(elements[i], totalAmount);
+ totalAmount = cb(elements[i], totalAmount);
40
41
42
return totalAmount;
0 commit comments