Update calculator.js

This commit is contained in:
Rhys 2018-09-28 13:38:36 +08:00 committed by GitHub
parent 3182c2c22d
commit 3e28169672
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}