Skip to content

Justin Rigler - #211

Closed
jayyargh wants to merge 3 commits into
bloominstituteoftechnology:masterfrom
jayyargh:master
Closed

Justin Rigler#211
jayyargh wants to merge 3 commits into
bloominstituteoftechnology:masterfrom
jayyargh:master

Conversation

@jayyargh

Copy link
Copy Markdown

No description provided.

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

Overall, you did an awesome job. I know this material can be difficult - just let me know if you need extra understanding! Something I would recommend is for you to review the lecture videos. There is a lot to learn the second time around! Upon saying that, if you get stuck on anything for more than 20 min, HOLLER AT SOMEONE. ❤️

Comment thread Answers.md
# Your responses to the short answer questions should be laid out here using Mark Down.
### For help with markdown syntax [Go here](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)

1. .forEach merely iterates through an array while .map actually iterates and takes the elements to make a new array.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A clear difference is that forEach doesn't return anything whereas map does! Good answer!

Comment thread Answers.md

2. Boolean, Null, Undefined, Number, String, Symbol and Object. An array is an object but it comes with tons of methods (like .length) that can be used to iterate through it.

3. Closures are functions called within themselves that can store the updated variables of their outer scoped 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.

Your definition of closures is 100% correct! I forgot to give you a link to understand it more in-depth but better late than never right?? 😅
http://javascriptissexy.com/understand-javascript-closures-with-ease/

Comment thread src/challenges.js
// newCounter(); // 2
let count = 0;
function increment() {
return count++;

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 should have it so that it returns ++count . When you have count++ it will save the count before it iterates which is something that we don't want!

Comment thread src/challenges.js
const limitFunctionCallCount = (cb, n) => {
// Should return a function that invokes `cb`.
// The returned function should only allow `cb` to be invoked `n` times.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This method can be done by looking at your previous projects! Take a look at JS-II I believe.
For this portion, you can implement something like a counter and calling a cb from it. If you are still having trouble, just let me know or your group!

@mixelpixel mixelpixel closed this Apr 20, 2018
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.

3 participants