Skip to content

Conversation

@MontseBadia
Copy link

Copy link
Contributor

@tawebbcn tawebbcn left a 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!

var uppercase = hacker1.toUpperCase();
var name2 = "";
for (var i=0; i<hacker1.length; i++) {
name += uppercase[i]+ " ";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool!

name += uppercase[i]+ " ";
}
console.log(name);
var value = hacker1.length -1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's ok, but you don't need to create a variable for that. It will not modify its value if you modify the hacker1 variable later in your program.

}
console.log(name);
var value = hacker1.length -1;
for (var i=value; i>=0; --i) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can do then:

for (var i=hacker1.length -1; i>=0; --i) {

console.log("The navigator's name goes first.")
} else {
console.log("You both have the same name.")
}; No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@tawebbcn tawebbcn closed this Jun 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants