Skip to content

Commit 1f70485

Browse files
committed
current state
1 parent 49bc04b commit 1f70485

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/arrays.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const reduce = (elements, cb, memo) => {
3636
}
3737

3838
for (i = 0; i < elements.length; i++) {
39-
totalAmount += cb(elements[i], totalAmount);
39+
totalAmount = cb(elements[i], totalAmount);
4040
}
4141

4242
return totalAmount;

0 commit comments

Comments
 (0)