Skip to content

my commit#25

Closed
JasonNuhn wants to merge 1 commit into
bloominstituteoftechnology:masterfrom
JasonNuhn:master
Closed

my commit#25
JasonNuhn wants to merge 1 commit into
bloominstituteoftechnology:masterfrom
JasonNuhn:master

Conversation

@JasonNuhn

Copy link
Copy Markdown

No description provided.

Comment thread src/arrays.js
const map = (elements, cb) => {
const newArray = [];
for (let i = 0; i < elements.length; i++) {
newArray.push(elements[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.

Don't forget to pass the elements to your cb. Line 20.

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.

This has been fixed. Thanks!

Comment thread src/callbacks.js

const last = (element, cb) => {
cb(element[foods.length-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.

You'll need to pass in foods, or a place holder for the array like (arr), or foods will be undefined. If element is your placeholder, you'll want the index of element, not the index of foods.

Comment thread src/closure.js
return {
increment() { return value += 1; },
decrement() { return value -= 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.

Another way to increment/decrement is to use the ++ and -- operators. Example: value++

Comment thread src/objects.js
// http://underscorejs.org/#values
Object.keys(values).forEach((key) => {
return Object.keys(obj[key]);
});

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 may want to revise line 19 from Object.keys(values) to Object.keys(obj) as obj is the object you're passing in and want to iterate over with forEach.

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

Completed

@sperrye sperrye closed this Oct 13, 2017
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