Skip to content

Nick Kruger - JavaScript-II - #582

Open
NickKruger wants to merge 5 commits into
bloominstituteoftechnology:masterfrom
NickKruger:master
Open

Nick Kruger - JavaScript-II #582
NickKruger wants to merge 5 commits into
bloominstituteoftechnology:masterfrom
NickKruger:master

Conversation

@NickKruger

Copy link
Copy Markdown

@VivaCode VivaCode 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.

#MVP

  • Callbacks
  • Array Methods (Use .forEach(), .map(), .filter(), and .reduce())
  • Closures

#STRETCH

  • Stretch Problem
  • Arrow Function Syntax ES5 to ES6
  • Write some practice IFEEs

#COMMITS
good

#RATING: 2


let averageDonationAmount = [];

averageDonationAmount = runners.reduce(function (total, tally) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

consider the extra code that isn't needed if you're not pushing into an empty array. test it, does the function still work?

Comment thread assignments/callbacks.js
console.log(contains('Gum', items, match));
console.log(contains('Hot Sauce', items, match));
console.log(contains('yo-yo', items, match));
console.log(contains('Apples', items, match));

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 job!

Comment thread assignments/closure.js
myName();
// ==== Challenge 2: Create a counter function ====
const counter = () => {
const counter = function () {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why did you change this from arrow function?

Comment thread assignments/closure.js
};
}

const newCounter = counter();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

what is the purpose of newCounter?
look into the difference between ++i and i++ - that may be helpful here.

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