From 7b03e764bb498511c104b02fd3e8df9752ff1ef7 Mon Sep 17 00:00:00 2001 From: Rhys <105ron@users.noreply.github.com> Date: Fri, 28 Sep 2018 13:35:21 +0800 Subject: [PATCH] Update calculator.js Fix typo --- calculator/calculator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calculator/calculator.js b/calculator/calculator.js index ac5d6e1..56b6288 100644 --- a/calculator/calculator.js +++ b/calculator/calculator.js @@ -10,7 +10,7 @@ function sum(array) { return array.reduce((current, total) => total + current, 0); } -function multipy (array) { +function multiply (array) { return array.length ? array.reduce((accumulator, nextItem) => accumulator * nextItem): 0; }