-
Notifications
You must be signed in to change notification settings - Fork 5.8k
ing-karin-dirk solution #576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
console.log(`The driver has the longest name, it has ${lenHacker1} characters.`); | ||
}else if(lenHacker1<lenHacker2){ | ||
console.log(`It seems that the navigator has the longest name, it has ${lenHacker2} characters.`); | ||
}else{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer explicit condition like " === "
|
||
// Iteration 3: Loops | ||
let upperHacker1=hacker1[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ERROR: Wrong assumption that hacker1[0] is already uppercase
// Iteration 3: Loops | ||
let upperHacker1=hacker1[0]; | ||
for(let i=1;i<lenHacker1;i++){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ERROR: Loop should start at i = 0. See above
}else if(hacker1>hacker2){ | ||
console.log(`Yo, the navigator goes first definitely`); | ||
}else{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer explicit condition like " === "
*/ | ||
|
||
if(hacker1<hacker2){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer localeCompare() as per example in the lesson material
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good.
Iteration 3: should use localeComapre()
Up till iteration 3
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. |
This pull request is closed. Thank you. |
No description provided.