Thuy Pham - #2
Closed
iamthuypham wants to merge 8 commits into
Closed
Conversation
ghost
reviewed
Apr 18, 2018
| // 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 = []; | ||
| fullName = runners.forEach((each) => { | ||
| return `${each.first_name} ${each.last_name}` |
There was a problem hiding this comment.
I have no doubts you'll manage this without error.
ghost
reviewed
Apr 18, 2018
| // 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 = []; | ||
| console.log(ticketPriceTotal); | ||
| ticketPriceTotal[0] = runners.reduce((start, current) => |
ghost
reviewed
Apr 18, 2018
| // Problem 1 | ||
| // Find all runners whose first and last name have the same first character | ||
| runners.filter((each) => ( | ||
| each.first_name[0] === each.last_name[0] |
ghost
reviewed
Apr 18, 2018
|
|
||
| // Problem 2 | ||
| // Calculate total donations coming from each company | ||
| const getDonationsFromEachCompany = runners.sort((x, y) => { |
ghost
reviewed
Apr 18, 2018
|
|
||
| const res = []; | ||
|
|
||
| for (let i = 0; i < getDonationsFromEachCompany.length; i++) { |
There was a problem hiding this comment.
For a complexity this high I must ask that you start developing a habit of using comments.
ghost
reviewed
Apr 18, 2018
| // How many runners come from the same company? | ||
| let count = 0 | ||
| runners.sort((a,b) => { // Sorting whole list by company name | ||
| if (a.company_name > b.company_name) return 1 |
There was a problem hiding this comment.
Is this the default functionality of the sort method?
ghost
reviewed
Apr 18, 2018
| return 0 | ||
| }).forEach((current, i, arr) => { // Iterate each runner, evaluate the runner's company_name with the next runner's company_name | ||
| if (arr[i+1] && current.company_name === arr[i+1].company_name){ | ||
| count++ |
ghost
reviewed
Apr 18, 2018
| // console.log(newCounter.increment()) | ||
| // console.log(newCounter.increment()) | ||
| // console.log(newCounter.increment()) | ||
| // console.log(newCounter.decrement()) |
ghost
reviewed
Apr 18, 2018
ghost
left a comment
There was a problem hiding this comment.
Good work. You should begin using comments.
brettmadrid
added a commit
to brettmadrid/JavaScript-II
that referenced
this pull request
Oct 20, 2018
brettmadrid
added a commit
to brettmadrid/JavaScript-II
that referenced
this pull request
Oct 20, 2018
Git-Grobe
added a commit
to Git-Grobe/JavaScript-II
that referenced
this pull request
Jan 18, 2019
diamondpowell
added a commit
to diamondpowell/JavaScript-II
that referenced
this pull request
Jan 19, 2019
BreyBatten
added a commit
to BreyBatten/JavaScript-II
that referenced
this pull request
Mar 29, 2019
I worked through the first two challenges on the page. I had a breakthrough on bloominstituteoftechnology#2, when I couldn't get it to work and then figured it out.
pvaidya56
added a commit
to pvaidya56/JavaScript-II
that referenced
this pull request
Apr 5, 2019
anthonypiazza
added a commit
to anthonypiazza/JavaScript-II
that referenced
this pull request
May 7, 2019
afberwick
pushed a commit
to afberwick/JavaScript-II
that referenced
this pull request
May 25, 2019
afberwick
pushed a commit
to afberwick/JavaScript-II
that referenced
this pull request
May 26, 2019
… the answer .map only
afberwick
pushed a commit
to afberwick/JavaScript-II
that referenced
this pull request
May 26, 2019
…instituteoftechnology#3 of array-methods.js
lizdoyle
pushed a commit
to lizdoyle/JavaScript-II
that referenced
this pull request
May 28, 2019
hugscity
added a commit
to hugscity/JavaScript-II
that referenced
this pull request
Sep 17, 2019
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.
No description provided.