-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[BET-FT] Jason Franklin, Nora Nicklis #610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
console.log( | ||
`Wow, you both have equally long names, ${hacker2.length} characters!` | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
let hacker1 = "Nora"; | ||
//console.log(`The driver's name is ${hacker1}`); | ||
let hacker2 = "Jason"; | ||
//console.log(`The navigators's name is ${hacker2}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
upperCaseName += hacker1[i].toUpperCase() + " "; | ||
} | ||
console.log(upperCaseName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking below that you already understand how .split() and .join() works. What you can do here is simply
hacker1.split("").toUpperCase().join(" ")
.reverse() | ||
.join("") | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Nice
// Iteration 3: Loops | ||
|
||
if (hacker1 < hacker2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be careful to do this when you want to sort by lexicographical order because it does work for every case. Best is to use localeCompare()
This pull request has been automatically marked as stale because it didn't have any recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This pull request is closed. Thank you. |
Done