-
Notifications
You must be signed in to change notification settings - Fork 5.8k
BCN Will Javier Jose #153
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
BCN Will Javier Jose #153
Conversation
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.
Good job! Keep working hard! 🚀
|
||
for (var i = 0; i < hacker2.length; i++) { | ||
spacedString = spacedString + hacker2[i].toUpperCase() + " "; | ||
} |
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!
console.log( | ||
"wow, you both got equally long names, " + hacker1.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.
👍
|
||
for (var i = hacker1.length - 1; i >= 0; i--) { | ||
backwardsString = backwardsString + hacker1[i]; | ||
} |
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. Also try with:
backwardsString += hacker1[i];
var backwardsString = ""; | ||
|
||
for (var i = hacker1.length - 1; i >= 0; i--) { | ||
backwardsString = backwardsString + hacker1[i]; |
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.
You also can do:
backwardsString += hacker1[i];
backwardsString = backwardsString + hacker1[i]; | ||
} | ||
|
||
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.
👍
@Javirum @josellanza