mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-06-05 15:09:09 +09:00
Update calculator.js
Fix typo
This commit is contained in:
@@ -10,7 +10,7 @@ function sum(array) {
|
||||
return array.reduce((current, total) => total + current, 0);
|
||||
}
|
||||
|
||||
function multipy (array) {
|
||||
function multiply (array) {
|
||||
return array.length
|
||||
? array.reduce((accumulator, nextItem) => accumulator * nextItem): 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user