From 94cb07cfc61967772c587db428d624c260dc9770 Mon Sep 17 00:00:00 2001 From: Isah Jacob Date: Mon, 31 Oct 2022 18:52:54 +0100 Subject: [PATCH] created two prameter inside the add function assigned each with a value 8 and 10 add the two variable using the plus operator assign the result to the result variable and return the result variable --- 08_calculator/calculator.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/08_calculator/calculator.js b/08_calculator/calculator.js index c22e8d2..a6c5478 100644 --- a/08_calculator/calculator.js +++ b/08_calculator/calculator.js @@ -1,8 +1,14 @@ -const add = function() { +const add = function(firstValue, secondValue) { + firstValue = 8 + secondValue = 10 + result = firstValue + secondValue + return result + }; const subtract = function() { + };