Skip to content

Conversation

akups
Copy link

@akups akups commented Jan 6, 2020

No description provided.

const hacker2 = "Akua";
console.log(hacker2);
if (hacker1.length > hacker2.length) {
console.log(hacker1);

Choose a reason for hiding this comment

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

add a text, so say hacker1's name is longer (or something similar)

reverseNavigator += hacker1[i];
}

console.log(reverseNavigator);

Choose a reason for hiding this comment

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

👍

console.log(`${hacker1}'s name goes first.`);
} else if (hacker1 > hacker2) {
console.log(`Yo, ${hacker2} goes first definitely.`);
} else console.log(`What?! You both have the same name?`);

Choose a reason for hiding this comment

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

I would use localeCompare() in order to sort by lexicographical order. Simply checking which string is bigger will not always work to sort by lexicographical order.

@stale
Copy link

stale bot commented Feb 6, 2020

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 6, 2020
@stale
Copy link

stale bot commented Feb 8, 2020

This pull request is closed. Thank you.

@stale stale bot closed this Feb 8, 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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy