From f1f97f429555741551d75dcbb809612fe1645593 Mon Sep 17 00:00:00 2001 From: Isah Jacob Date: Mon, 31 Oct 2022 21:31:57 +0100 Subject: [PATCH] modified the each function --- 08_calculator/calculator.js | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/08_calculator/calculator.js b/08_calculator/calculator.js index a6c5478..ded7068 100644 --- a/08_calculator/calculator.js +++ b/08_calculator/calculator.js @@ -1,32 +1,14 @@ -const add = function(firstValue, secondValue) { - firstValue = 8 - secondValue = 10 - result = firstValue + secondValue - return result - - -}; +function add (numberOne, numberTwo) { + return numberOne + numberTwo; +} -const subtract = function() { - - -}; +function subtract (numberOne, numberTwo) { + return numberOne + numberTwo;; +} -const sum = function() { - -}; - -const multiply = function() { - -}; - -const power = function() { - -}; - -const factorial = function() { - -}; +add(0, 0) +add(2, 2) +add(2,6) // Do not edit below this line module.exports = {