Update calculator.js
This commit is contained in:
parent
3182c2c22d
commit
3e28169672
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ function sum(array) {
|
|||
|
||||
function multiply(array) {
|
||||
return array.length
|
||||
? array.reduce((accumulator, nextItem) => accumulator * nextItem
|
||||
? array.reduce((accumulator, nextItem) => accumulator * nextItem)
|
||||
: 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue