Skip to content

Done - #654

Closed
fhoman wants to merge 2 commits into
ironhack-labs:masterfrom
fhoman:master
Closed

Done#654
fhoman wants to merge 2 commits into
ironhack-labs:masterfrom
fhoman:master

Conversation

@fhoman

@fhoman fhoman commented Jan 9, 2020

Copy link
Copy Markdown

No description provided.

Comment thread js/index.js
console.log(`It seems that the navigator has the longest name, it has ${hacker2.length} characters.`)

}
else if (hacker1.length === hacker2.length) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You can also just use an "else" statement here

Comment thread js/index.js
nameReverseOrder = '';
}
console.log(nameWithSpaces);
for (let j = hacker2.length -1; j > 0; j-- ) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

in the for loop, you should use "j>=0" otherwise the first letter won't print.

Comment thread js/index.js
for (let i = 0; i < hacker1Uppercase.length; i++) {
console.log(hacker1Uppercase[i] );
nameWithSpaces += `${hacker1Uppercase[i]} `;
nameReverseOrder = '';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If you're not using it inside the loop, It's better to define nameReverseOrder in the global scope.

Comment thread js/index.js
// Lexical order


if (hacker1 === hacker2) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think you meant to use "hacker1.length === hacker2.length"

Comment thread js/index.js

}

else if (hacker1.localeCompare(hacker2) === -1) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Again you can use the ".length" property here

Comment thread js/index.js
}

else if (hacker1.localeCompare(hacker2) === 1) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Again you can use the ".length" property here

@stale

stale Bot commented Feb 10, 2020

Copy link
Copy Markdown

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.

@stale stale Bot added the stale label Feb 10, 2020
@stale

stale Bot commented Feb 12, 2020

Copy link
Copy Markdown

This pull request is closed. Thank you.

@stale stale Bot closed this Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants