mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-06-05 15:09:09 +09:00
Merge pull request #1 from seoul2045/reduce-method
Update calculator.js
This commit is contained in:
@@ -7,7 +7,7 @@ function subtract(a, b) {
|
||||
}
|
||||
|
||||
function sum(array) {
|
||||
return array.reduce((current, total) => total + current, 0);
|
||||
return array.reduce((total, current) => total + current, 0);
|
||||
}
|
||||
|
||||
function multiply(array) {
|
||||
|
||||
Reference in New Issue
Block a user