diff --git a/index.js b/index.js index 6b0fec3ad..5fa2f3795 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,99 @@ -// Iteration 1: Names and Input +//task1 +let hacker1 = "Ulvi"; +console.log("The driver's name is " + hacker1); +let hacker2 = "Yunus" +console.log("The navigator's name is " + hacker2); -// Iteration 2: Conditionals +//task2 +if(hacker1.length>hacker2.length){ + console.log(`The driver has the longest name, it has ${hacker1.length} characters.`); +} +else if(hacker1.length=0;i--){ + reversed+=hacker2[i]; +} +console.log(reversed) + +if(hacker1>hacker2){ + console.log("The driver's name goes first."); +} +else if(hacker1 wd === "et") +// .length +// console.log(count1); + +//bonus2 +let phraseToCheck="Amor, Roma"; +let cleaned=""; +for(let c of phraseToCheck){ + c = c.toLowerCase(); + + if ( + (c >= "a" && c <= "z") || + (c >= "0" && c <= "9") + ) { + cleaned += c; + } +} + +let isPoln=true; +for(let i=0;i