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:
parent
f7ca8ba56e
commit
94cb07cfc6
|
@ -1,9 +1,15 @@
|
|||
const add = function() {
|
||||
const add = function(firstValue, secondValue) {
|
||||
firstValue = 8
|
||||
secondValue = 10
|
||||
result = firstValue + secondValue
|
||||
return result
|
||||
|
||||
|
||||
};
|
||||
|
||||
const subtract = function() {
|
||||
|
||||
|
||||
};
|
||||
|
||||
const sum = function() {
|
||||
|
|
Loading…
Reference in New Issue