From 3182c2c22d5f72b82bac2edefdaaf4b01948480c Mon Sep 17 00:00:00 2001 From: Rhys <105ron@users.noreply.github.com> Date: Fri, 28 Sep 2018 13:36:03 +0800 Subject: [PATCH] Update calculator.js --- calculator/calculator.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/calculator/calculator.js b/calculator/calculator.js index 6037434..5ec472d 100644 --- a/calculator/calculator.js +++ b/calculator/calculator.js @@ -12,7 +12,8 @@ function sum(array) { function multiply(array) { return array.length - ? array.reduce((accumulator, nextItem) => accumulator * nextItem): 0; + ? array.reduce((accumulator, nextItem) => accumulator * nextItem + : 0; } function power(a, b) {