Skip to content

[sukhada gholba] JavaScript-II - #73

Open
sukhadagholba wants to merge 4 commits into
bloominstituteoftechnology:masterfrom
sukhadagholba:master
Open

[sukhada gholba] JavaScript-II#73
sukhadagholba wants to merge 4 commits into
bloominstituteoftechnology:masterfrom
sukhadagholba:master

Conversation

@sukhadagholba

Copy link
Copy Markdown

No description provided.

// 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 = [];

ticketPriceTotal = runners.reduce((acc, 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 here.

// Problem 1- Number of people who have donated more than $200

let donors =[];
donors = runners.filter((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 use of filter.

Comment thread assignments/closure.js
// Return a function that when invoked increments and returns a counter variable.

var count = 0;
return function () {return count+=1;}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

great job here. One thing to consider. look into what count++ would do, vs if you had used ++count

// console.log(triple); No newline at end of file
// console.log(triple);

const triple = exampleArray.map((num) =>{

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

great use of map.

@bdurb

bdurb commented May 23, 2018

Copy link
Copy Markdown

@sukhadagholba thank you for the PR. I would still encourage you do make more commits. but all in all excellent work today!

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