From 9660f6ec14c01af5f194018de1ae4ace646c1224 Mon Sep 17 00:00:00 2001 From: dylanbaker21 Date: Thu, 20 Sep 2018 21:11:25 -0400 Subject: [PATCH 1/2] functions --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 1ebf0dd..b249ab0 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ - +/* Math Functions */ function addition(x,y) { var z = x + y console.log(z) From d83185b7ea32453e624b0fb84a065b1181279f24 Mon Sep 17 00:00:00 2001 From: dylanbaker21 Date: Thu, 20 Sep 2018 21:44:07 -0400 Subject: [PATCH 2/2] if/else statement with functions --- index.html | 3 ++- index.js => scripts/index.js | 12 ++++++++++++ index.css => styles/index.css | 0 3 files changed, 14 insertions(+), 1 deletion(-) rename index.js => scripts/index.js (53%) rename index.css => styles/index.css (100%) diff --git a/index.html b/index.html index a494ee6..a5bbb9d 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,8 @@ - + +
diff --git a/index.js b/scripts/index.js similarity index 53% rename from index.js rename to scripts/index.js index b249ab0..730e3f9 100644 --- a/index.js +++ b/scripts/index.js @@ -18,3 +18,15 @@ function division(x,y) { var z = x / y console.log(z) } + +var sum = addition(10,12) +var dif = subtraction(10,8) +var prod = multiplication(6,3) +var div = division(100,5) + +if (sum>dif) { + console.log("the sum is greater than the difference") +} +else { + console.log("the difference is greater than the sum") +} diff --git a/index.css b/styles/index.css similarity index 100% rename from index.css rename to styles/index.css