[BET-FT] Jason Franklin, Nora Nicklis #610
Closed
Norizinus wants to merge 1 commit into
Closed
Conversation
DalinaLeila
reviewed
Jan 7, 2020
| console.log( | ||
| `Wow, you both have equally long names, ${hacker2.length} characters!` | ||
| ); | ||
| } |
| let hacker1 = "Nora"; | ||
| //console.log(`The driver's name is ${hacker1}`); | ||
| let hacker2 = "Jason"; | ||
| //console.log(`The navigators's name is ${hacker2}`); |
| for (let i = 0; i < hacker1.length; i++) { | ||
| upperCaseName += hacker1[i].toUpperCase() + " "; | ||
| } | ||
| console.log(upperCaseName); |
There was a problem hiding this comment.
Looking below that you already understand how .split() and .join() works. What you can do here is simply
hacker1.split("").toUpperCase().join(" ")
| .split("") | ||
| .reverse() | ||
| .join("") | ||
| ); |
|
|
||
| // Iteration 3: Loops | ||
|
|
||
| if (hacker1 < hacker2) { |
There was a problem hiding this comment.
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. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Done