Skip to content

William DiFulvio [JavaScript-II] - #115

Open
Wdifulvio523 wants to merge 7 commits into
bloominstituteoftechnology:masterfrom
Wdifulvio523:master
Open

William DiFulvio [JavaScript-II]#115
Wdifulvio523 wants to merge 7 commits into
bloominstituteoftechnology:masterfrom
Wdifulvio523:master

Conversation

@Wdifulvio523

Copy link
Copy Markdown

No description provided.

Comment thread assignments/array-methods.js Outdated
// ==== Challenge 1: Use .forEach() ====
// 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(i) {

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 technically sound, however, i is often used to represent index, not the item. might confuse others down the road.

// ==== Challenge 4: Use .reduce() ====
// The donations need to be tallied up and reported for tax purposes. Add up all the donations into a ticketPriceTotal array and log the result
let ticketPriceTotal = [];
let ticketPriceTotal = runners.reduce((theReducer, item) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nice job with reduce

Comment thread assignments/callbacks.js Outdated
if (list[i] === item) {
cb(true)
}
} cb(false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

best practices would have you put the cb(false) on the next line after the curly brace. but still technically sound.

@bdurb

bdurb commented May 23, 2018

Copy link
Copy Markdown

@Wdifulvio523 thank you for the PR. Great job today. I pointed out a few things that while technically sound, might not fit in with best practices. but all in all great 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