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
This commit is contained in:
Isah Jacob 2022-10-31 18:52:54 +01:00
parent f7ca8ba56e
commit 94cb07cfc6
1 changed files with 7 additions and 1 deletions

View File

@ -1,8 +1,14 @@
const add = function() { const add = function(firstValue, secondValue) {
firstValue = 8
secondValue = 10
result = firstValue + secondValue
return result
}; };
const subtract = function() { const subtract = function() {
}; };