diff --git a/js/index.js b/js/index.js index dd8ff0062..f9d074d9c 100644 --- a/js/index.js +++ b/js/index.js @@ -1,7 +1,22 @@ // Iteration 1: Names and Input +let hacker1 = "Chaba"; +console.log(hacker1); +let hacker2 = "Igor"; +console.log(hacker2); // Iteration 2: Conditionals +if (hacker1.length > hacker2.length) { + console.log('The driver has a longest name ${hacker1.length}'); + } + else if(hacker1.length < hacker2.length) { + console.log("It seems that the navigator has the longest name, it has ${hacker2.length} characters"); + } + else { + console.log ("Wow, you both have equally lang names, ${hacker.1length} characters!.") + } +// Iteration 3: Loops +console.log(hacker1.toUpperCase().split('').join('')); -// Iteration 3: Loops \ No newline at end of file +console.log(hacker2.split("").reverse().join("")); \ No newline at end of file