diff --git a/starter-code/basic-algorithms.js b/starter-code/basic-algorithms.js index 82f20d8ba..da1d85d8a 100644 --- a/starter-code/basic-algorithms.js +++ b/starter-code/basic-algorithms.js @@ -1,7 +1,17 @@ -// Names and Input - - -//Conditionals - - -// Lorem ipsum generator +var hacker1 = "Danny" +var hacker2 = prompt("what is your name?") +console.log("The drivers name is " + hacker1) +console.log("The navigator's name is " + hacker2) +if (hacker1.length > hacker2.length){ + console.log("The Driver has the longest name, it has XX characters"); +} else if (hacker2.length > hacker1.length) { + console.log("Yo, navigator got the longest name, it has XX characters"); +} else { + console.log("wow, you both got equally long names, XX characters!!") +} +for(var i=0; i<1; i++){ + console.log(hacker1.split("").join(" ").toUpperCase()) +} +for(var i=0; i<1; i++){ + console.log(hacker2.split("").reverse) +} \ No newline at end of file
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: