Skip to content

Commit c9402c1

Browse files
JonJon
authored andcommitted
Exercise devleagueprep#3
1 parent 57de77d commit c9402c1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

exercises.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ console.log(testGreeting); // printing the output value of the function.
2727
* These two variables will be used to invoke the functions #2 - #5.
2828
*/
2929

30-
var bango1 = 1;
31-
var bango2 = 2;
30+
var bango1 = 5;
31+
var bango2 = 8;
3232

3333
/*
3434
* #2
@@ -54,6 +54,7 @@ var sum = add(bango1, bango2);
5454
console.log('sum: ' + sum);
5555

5656

57+
5758
/*
5859
* #3
5960
* Function - subtract
@@ -68,7 +69,13 @@ console.log('sum: ' + sum);
6869
* Console.log `difference` to test your code.
6970
*/
7071

72+
function subtract(num1, num2){
73+
return num1 - num2;
74+
75+
}
7176

77+
var difference = subtract(bango1,bango2);
78+
console.log(difference);
7279

7380
/*
7481
* #4

0 commit comments

Comments
 (0)