Update calculator.js
Fix typo
This commit is contained in:
parent
d3412c1423
commit
7b03e764bb
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ function sum(array) {
|
||||||
return array.reduce((current, total) => total + current, 0);
|
return array.reduce((current, total) => total + current, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function multipy (array) {
|
function multiply (array) {
|
||||||
return array.length
|
return array.length
|
||||||
? array.reduce((accumulator, nextItem) => accumulator * nextItem): 0;
|
? array.reduce((accumulator, nextItem) => accumulator * nextItem): 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue