Update calculator.js

Fix typo
This commit is contained in:
Rhys 2018-09-28 13:35:21 +08:00 committed by GitHub
parent d3412c1423
commit 7b03e764bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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