Skip to content

[SAO FT6 - DE - W1D3] ALEX#587

Closed
AlexChivvy wants to merge 1 commit into
ironhack-labs:masterfrom
AlexChivvy:master
Closed

[SAO FT6 - DE - W1D3] ALEX#587
AlexChivvy wants to merge 1 commit into
ironhack-labs:masterfrom
AlexChivvy:master

Conversation

@AlexChivvy
Copy link
Copy Markdown

No description provided.

Comment thread js/index.js
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.`;
}
}
}
Copy link
Copy Markdown

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
Copy Markdown

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

@stale
Copy link
Copy Markdown

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
Copy Markdown

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