Skip to content

Joseph Stossmeister: Main Finished - #125

Open
Jstoss wants to merge 6 commits into
bloominstituteoftechnology:masterfrom
Jstoss:master
Open

Joseph Stossmeister: Main Finished#125
Jstoss wants to merge 6 commits into
bloominstituteoftechnology:masterfrom
Jstoss:master

Conversation

@Jstoss

@Jstoss Jstoss commented Jun 26, 2018

Copy link
Copy Markdown
  • function-conversion completed

@Jstoss Jstoss changed the title Joseph Stossmeister: Open PR Joseph Stossmeister: WiP Jun 26, 2018
@Jstoss Jstoss changed the title Joseph Stossmeister: WiP Joseph Stossmeister: Main Finished Jun 26, 2018
-wanted to make sure I did the assignment as asked

@EricHech EricHech left a comment

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 killed it man. Good job.

// ==== 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( (donation, runner) => donation += runner.donation, 0 );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't see a need to set the starting val to 0 here, just a heads up.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I was having a weird bug that if I didn't set the starting value, it would freak out and return this long object value to the console. I meant to bring it up at the end of the day, but I completely forgot about it.

console.log(theBusinesses);

// Problem 3 No newline at end of file
// Problem 3

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 work in this file! Great creativity and commenting for your work.

For your filter, why not just do?:
runner => runner.company_name !== 'Photospace')

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I'm going to be completely honest. It's been so long since I've had to or need to use !== that I completely forgot that it existed.

Comment thread assignments/closure.js
@@ -1,19 +1,85 @@
// ==== Challenge 1: Write your own closure ====
// Write a simple closure of your own creation. Keep it simple!
let hundredWave = () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Killin' it! Awesome example.

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