Skip to content

Cam Perry - Javascript II #1

Open
cpscott1 wants to merge 5 commits intomasterfrom
cam-perry
Open

Cam Perry - Javascript II #1
cpscott1 wants to merge 5 commits intomasterfrom
cam-perry

Conversation

@cpscott1
Copy link
Owner

No description provided.

@cpscott1 cpscott1 requested a review from ielvisd January 18, 2019 04:37
Copy link
Collaborator

@ielvisd ielvisd left a comment

Choose a reason for hiding this comment

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

Going to send you the solution to this challenge because you're very close to hitting MVP with some small changes.

return contains.includes(items);
}

contains(item, function(list) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Everything looks good except for this contains function. Use some console logs here to check your work along the way.

// The event director needs both the first and last names of each runner for their running bibs. Combine both the first and last names into a new array called fullName.
let fullName = [];

runners.forEach(function(firstName, lastName) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You only need to pass one thing into the function because you are already doing something forEach item you pass


console.log(fullName);

// ==== Challenge 2: Use .map() ====
Copy link
Collaborator

Choose a reason for hiding this comment

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

use .map (refer to the MDN) documentation for array methods for some examples. Same for .filter

speak('Yo');


// ==== Challenge 2: Create a counter function ====
Copy link
Collaborator

Choose a reason for hiding this comment

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

You're almost there for challenge 2, throw some console.logs in there to check your work as you work through your function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants