Closed
Conversation
| console.log(reverseNavigatorName) | ||
|
|
||
| console.log(hacker2.split('').reverse().join('')); | ||
| var Order =[hacker1, hacker2]; |
There was a problem hiding this comment.
Good !! Now you could just add :
if (hacker1 === hacker2){
console.log("What?! You both got the same name?");
} else if (names[0] === hacker1) {
console.log("The driver's name goes first");
} else {
console.log("Yo, the navigator goes first definitely");
}
|
|
||
| var loremIpsum = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas vitae lacinia eros. Curabitur molestie arcu sit amet lectus consequat, ac rutrum ligula mattis. Ut pharetra interdum sem, vel bibendum neque. Nam dolor tortor, luctus vel pulvinar non, ultricies id nisi. Nulla porta, risus sed sodales convallis, diam velit feugiat neque, sed maximus orci massa quis urna. Phasellus pellentesque dignissim erat, in ultricies est ornare ut. Pellentesque ut diam consectetur, facilisis felis ac, blandit quam. Morbi nibh nulla, porttitor et faucibus ac, ultrices quis velit.Vivamus consectetur sapien luctus lobortis aliquam. Cras nec interdum lectus, id placerat massa. Morbi tristique vehicula enim, eget dignissim nisl varius non. Phasellus ornare suscipit urna, at aliquam felis euismod sed. Vestibulum varius dolor nulla, a bibendum dolor varius a. Nunc eu erat ante. Aenean nunc eros, euismod quis tortor non, condimentum tempus lorem. Aenean vulputate faucibus mauris nec tempor. Curabitur et placerat felis. Nam iaculis dignissim lorem, at accumsan quam luctus sed. Nulla dignissim ullamcorper libero venenatis ultricies. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras nec dui sit amet odio volutpat mattis ut vitae nulla. In ullamcorper enim vel risus rutrum, et tristique sem accumsan. Nunc eget ipsum vitae augue vulputate laoreet et ac est. Integer quis augue nulla. In volutpat tincidunt laoreet. Proin lectus neque, finibus finibus commodo id, eleifend nec justo. Suspendisse ac purus sagittis, facilisis nibh ac, elementum elit. Curabitur sapien enim, dapibus in diam id, gravida sollicitudin mi. Aliquam pharetra arcu a lectus consequat ultricies. Suspendisse semper urna eu est dignissim, vitae commodo libero efficitur. In in elit et ipsum volutpat pretium. Aliquam magna diam, vehicula ut velit non, mollis vehicula lectus. Etiam ac lobortis risus. Aliquam sit amet massa eget libero fringilla interdum ut lobortis urna."; | ||
| console.log(loremIpsum.split(" ").length); | ||
| console.log(loremIpsum.split("et").length-1) |
There was a problem hiding this comment.
you can put spaces around " et " in order to have only those which are not part of a word :)
|
Good job !! You understand both loops and string methods, that's good! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@nicrodemus
not sure that lorem ipsum exercise is correct.