Created
February 7, 2019 03:10
-
-
Save nokrosis/c742562cd7fc1ab8f2244876d61a6aa9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let hacker1 = "Edgar" | |
console.log("The driver's name is " + hacker1 ) | |
let hacker2 = prompt("¿Cual es tu nombre?") | |
console.log("The navigator's name is " + hacker2 ) | |
if (hacker1.length> hacker2.length) { | |
console.log("The Driver has the longest name, it has "+hacker1.length+" characters") | |
} | |
else if(hacker1.length<hacker2.length) { | |
console.log("Yo, navigator got the longest name, it has "+hacker2.length+" character " ) | |
} else if (hacker1.length == hacker2.length) { | |
console.log("wow, you both got equally long names, "+hacker1.length+" characters!!") | |
} | |
console.log(hacker1.toUpperCase().split('').join(' ')) | |
console.log(hacker2.split('').reverse().join('')) | |
if (hacker1 < hacker2) { | |
console.log("The driver's name goes first") | |
} | |
else if(hacker1>hacker2) { | |
console.log("Yo, the navigator goes first definitely" ) | |
} | |
else if(hacker1==hacker2) { | |
console.log("What?! You both got the same name?" ) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment