Skip to content

Kevin Tena [JavaScript-II]#69

Open
kevten22 wants to merge 11 commits intobloominstituteoftechnology:masterfrom
kevten22:master
Open

Kevin Tena [JavaScript-II]#69
kevten22 wants to merge 11 commits intobloominstituteoftechnology:masterfrom
kevten22:master

Conversation

@kevten22
Copy link
Copy Markdown

No description provided.


// ==== Challenge 2: Use .map() ====
// The event director needs to have all the runner's first names converted to uppercase because the director BECAME DRUNK WITH POWER. Convert each first name into all caps and log the result
let allCaps = [];
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You could have removed the let allCaps = [] here. You are re-assigning it with your function.

// Now that you have used .forEach(), .map(), .filter(), and .reduce(). I want you to think of potential problems you could solve given the data set and the 5k fun run theme. Try to solve 3 unique problems using one or many of the array methods listed above.

// Problem 1
// We want to know not which one of these runners is the best runner but which contributed most to the cause. Find out who contributed the most.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Awesome use of Map and Filter here. shows a great grasp of the material.


function firstItem(arr, cb) {
// firstItem passes the first item of the given array to the callback function.
cb(arr);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this is close, but remember its asking for the first item of the array to be passed into the callback. you are passing the whole array.

@bdurb
Copy link
Copy Markdown

bdurb commented May 23, 2018

@kevten22 thank you for the PR, and the commits. Your code looks well written. I pointed out a few things to consider, but all in all great work!

@bdurb
Copy link
Copy Markdown

bdurb commented May 23, 2018

@kevten22 thanks for taking action on feedback. Keep up the good work!

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