Skip to content
Open

done #3636

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5502
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

This exercise allows you to practice and apply the concepts and techniques taught in class.

Upon completion of this exercise, you will be able to:
Upon completion of this exercise, you will be able to:

- Run JavaScript code from your IDE, using a local server to load it in the browser
- Declare variables using `const` and `let` keywords and use them to store values.
Expand Down
20 changes: 20 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
// Iteration 1: Names and Input

const hacker1 = "Jane";
const hacker2 = "Tom"
console.log(`"The navigator's name is ${hacker2}"`)



// Iteration 2: Conditionals

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, the navigator goes first, definitely.`)
}
else{
console(`Wow, you both have equally long names, ${hacker1.length}, ${hacker2.length} characters!`)
}


// Iteration 3: Loops

console.log(hacker1.toUpperCase().slice(""))

console.log(hacker2.split("").reverse().join(""))