Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@AlexChivvy
Copy link

No description provided.

Comment on lines +43 to +57
for (i = 0; i < minLength; i++){
letterHacker1 = hacker1[i];
letterHacker2 = hacker2[i];
indexHacker1 = alphabet.indexOf(letterHacker1);
indexHacker2 = alphabet.indexOf(letterHacker2);
if (triggerOrderDetermined == 0){
if (indexHacker1 < indexHacker2) {
triggerOrderDetermined = 1;
orderAnnouncement = `The driver's name goes first.`;
} else if (indexHacker1 > indexHacker2) {
triggerOrderDetermined = 1;
orderAnnouncement = `Yo, the navigator goes first definitely.`;
}
}
}

Choose a reason for hiding this comment

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

Para resolver isso de uma forma mais simples, estude localeCompare:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare

@heitorgodau
Copy link

Ganhou pontos por ter feito e entregue, parabéns!
Vale a pena tentar fazer mais um pouco

@stale
Copy link

stale bot commented Dec 28, 2019

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 Dec 28, 2019
@stale
Copy link

stale bot commented Dec 30, 2019

This pull request is closed. Thank you.

@stale stale bot closed this Dec 30, 2019
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.