From b93c680dce63c2b137a8145e2683e6cf474d618d Mon Sep 17 00:00:00 2001 From: Victor Date: Fri, 7 Jul 2017 19:22:51 -1000 Subject: [PATCH 1/3] complete ex 3 --- exercises.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/exercises.js b/exercises.js index 100bedc..803fae9 100644 --- a/exercises.js +++ b/exercises.js @@ -27,7 +27,8 @@ console.log(testGreeting); // printing the output value of the function. * These two variables will be used to invoke the functions #2 - #5. */ - +var bango1 = 2; +var bango2 = 3; /* * #2 @@ -44,7 +45,14 @@ console.log(testGreeting); // printing the output value of the function. * Console.log `sum` to test your code. */ +function add(num1, num2){ + + return num1 + num2; +} + +var sum = add( ); +console.log("for function add solution: " + sum); /* * #3 @@ -60,6 +68,15 @@ console.log(testGreeting); // printing the output value of the function. * Console.log `difference` to test your code. */ +function subtract(num1, num2){ + return num1 - num2; + +} + +var difference = subtract(bango1, bango2); +console.log(difference); + + /* From 2d922cf81f6efa71e30ff272bb95ce0a8215d18d Mon Sep 17 00:00:00 2001 From: Victor Lee Date: Fri, 8 Sep 2017 19:55:56 -1000 Subject: [PATCH 2/3] add 2 variables --- exercises.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/exercises.js b/exercises.js index 803fae9..381a1f4 100644 --- a/exercises.js +++ b/exercises.js @@ -30,6 +30,7 @@ console.log(testGreeting); // printing the output value of the function. var bango1 = 2; var bango2 = 3; + /* * #2 * Function - add @@ -45,14 +46,7 @@ var bango2 = 3; * Console.log `sum` to test your code. */ -function add(num1, num2){ - - return num1 + num2; -} - -var sum = add( ); -console.log("for function add solution: " + sum); /* * #3 @@ -68,13 +62,6 @@ console.log("for function add solution: " + sum); * Console.log `difference` to test your code. */ -function subtract(num1, num2){ - return num1 - num2; - -} - -var difference = subtract(bango1, bango2); -console.log(difference); @@ -152,6 +139,8 @@ console.log(difference); + + /* * #9 * Function - checkQuotient From be34b3bc96c991f8baddf469d0d988e5df7f0d77 Mon Sep 17 00:00:00 2001 From: madycakes Date: Thu, 8 Feb 2018 16:37:51 -1000 Subject: [PATCH 3/3] ex1 complete --- exercises.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises.js b/exercises.js index 381a1f4..53cce6c 100644 --- a/exercises.js +++ b/exercises.js @@ -27,8 +27,8 @@ console.log(testGreeting); // printing the output value of the function. * These two variables will be used to invoke the functions #2 - #5. */ -var bango1 = 2; -var bango2 = 3; +var bango1 = 3; +var bango2 = 5; /*