Commiting challenges.js & answers.md - #28
Conversation
ryan-hamblin
left a comment
There was a problem hiding this comment.
Austin, I think you're doing great here. One thing I really like about your style is that you're curious. Curiosity will lead you to great places in this field. I want to see if you can't look into it further and come up with a way to solve the CacheFunction. I'm not too concerned about checkMatchingLeaves for you right now, as you'll get some exposure to an algorithm that is very familiar to that one in the coming week. Please keep asking the great questions you ask and always, throughout this process, continue to ask for reviews! Nice work bud! I wish I had more time to meet with you one on one today!
|
|
||
| # 1. Describe some of the differences between `.forEach` & `.map`. | ||
|
|
||
| .forEach is a loop that applies an operation to each list item. ForEach does not return something. |
There was a problem hiding this comment.
I love this. I would add onto it, that it's primary just a function to iterate over a list and callback the elements with the index. Just maybe swapping the term 'operation' to 'callback' seems a bit better.
| Undefined | ||
| Symbols (added in ES6) | ||
|
|
||
| Arrays can store multiple data types. |
There was a problem hiding this comment.
I'm looking here for this: to add on top of what you've said. Arrays are special types of Objects in JS.
|
|
||
| let me = 'Austin'; | ||
| function greatMe() { | ||
| console.log(me + 'Says Hello!'); |
There was a problem hiding this comment.
Beautiful explanation!
| if (str === '') { | ||
| return ''; | ||
| } | ||
| return reverseStr(str.substr(1)) + str.charAt(0); |
There was a problem hiding this comment.
Nice! carAt() and substr() both work really well here!
I definitely had to leave cache and leaves blank. No amount of copying what I saw helped me understand, so I know I need work there.
The only other thing here I added from memory without actual understanding of was the spread operator and args. Otherwise this felt pretty good!