8000 Merge pull request #1 from seoul2045/reduce-method · nima-m-git/javascript-exercises@e93caf6 · GitHub
[go: up one dir, main page]

Skip to content

Commit e93caf6

Browse files
authored
Merge pull request TheOdinProject#1 from seoul2045/reduce-method
Update calculator.js
2 parents 01aace2 + 645cbc7 commit e93caf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

calculator/calculator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function subtract(a, b) {
77
}
88

99
function sum(array) {
10-
return array.reduce((current, total) => total + current, 0);
10+
return array.reduce((total, current) => total + current, 0);
1111
}
1212

1313
function multiply(array) {

0 commit comments

Comments
 (0)
0