diff --git a/exercises.js b/exercises.js index 2f86f9d..76768a7 100644 --- a/exercises.js +++ b/exercises.js @@ -11,11 +11,9 @@ if(today === "Friday"){ If/else statements = Evaluates (or checks) a condition. If the condition is true, the first code block is executed. If the condition is false, the second code block is executed instead. */ -/*if(today === "Friday"){ - return "Let's Party!"; -}else{ - return "Get back to coding!"; -};*/ +console.log('test') + + /* @@ -30,6 +28,7 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true */ + /* * #2 * Function - login @@ -42,7 +41,15 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true * Console.log your result. */ +function login(password){ + if(password === 'test1234'){ + return 'Login Success!!!!!'; + }else{ + return 'get outta hea with 7 bangs!!!!!!!!!!!!!!' + } +} +console.log(login('test12345')) /* * #3 * Function - isGreaterThan @@ -84,6 +91,9 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true * Console.log your result. */ +var word = 'cat' //global scope +console.log(word.length) + /* @@ -219,6 +229,9 @@ If/else statements = Evaluates (or checks) a condition. If the condition is true + + + /* For loops - A for loop checks a condition a specific number of times and allows us to execute a code block and evaluate a condition to determine if our loop should run again. diff --git a/solutions.js b/solutions.js index 23a55f0..9daef0a 100644 --- a/solutions.js +++ b/solutions.js @@ -479,29 +479,20 @@ Final Boss */ var phrase = "An apple a day keeps Alice feeling awesome!"; - - function removeLetter(str){ - var newArr = []; - for(var i = 0; i