From 6e4a35f84367a6d6bd37dbb92566c53ec9c92db6 Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 8 Apr 2019 20:09:44 -1000 Subject: [PATCH] #3 and #4 --- exercises.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/exercises.js b/exercises.js index d54be8d..2e424d8 100644 --- a/exercises.js +++ b/exercises.js @@ -61,8 +61,6 @@ function login(password){ console.log("2. password " + login('test1234')); - - /* * #3 * Function - isGreaterThan @@ -76,6 +74,14 @@ console.log("2. password " + login('test1234')); * Console.log your result. */ +function isGreaterThan(first, second){ + if(first > second){ + return true; + }else{ + return false; + } +} +console.log("3. isGreaterThan " + isGreaterThan(6, 5)); /* @@ -90,6 +96,16 @@ console.log("2. password " + login('test1234')); * Console.log your result. */ +function mustBeTrue(boo){ + if(boo === true){ + return true; + }else{ + return false; + } + } +console.log("4. mustBeTrue " + mustBeTrue(true)); + + /*