Closed nicktu12 closed 1 year ago
Name | Link |
---|---|
Latest commit | 7f114417a7e494d7f19caa7bf75ee4b546376838 |
Latest deploy log | https://app.netlify.com/sites/sage-cupcake-e1a0c3/deploys/6443077459280f0008623359 |
Deploy Preview | https://deploy-preview-679--sage-cupcake-e1a0c3.netlify.app/lessons/module-2/closures |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
It seems like this does actually make sense as the 3rd scope lesson more than a stand alone lesson. It references knowledge learned from the 1st 2 scope lessons.
On lines 45-47, I wonder if we could try to explain this in more laymans terms for them as well. Something like: "To explain it differently, the getHangry() function is defined inside the definition of the eatSnack() function. Because of this, we can't call getHangry() outside of the eatSnack() function. It won't work, because its scope is limited to within the eatSnack() function where it was defined."
On line 47, would it be valuable to explicitly emphasize that its where the function is defined/declared, not invoked? We could add "(not invoked)" after the word "defined" to emphasize this.
On line 55, could we add on to the more thorough definition to make it "a closure is when an inner function is defined inside of another function and thereby has access to its outer function's variables."
I'm making a mental note for myself that the analyzeGrades() example will likely be pretty hard for them to digest and wrap their heads around. No suggestions, just a note
Really great work on this Nick. WOOF - closures are tricky! And the verbiage to explain them is tricky! Thanks for working hard to make this a valuable and approachable lesson for our students. I added some comments and wording tweaks for your consideration.
Thanks for the suggestions @kaylagordon and @hfaerber - made some updates based on your comments! Appreciate yall!
Description of changes made
Motivation for any changes
Questions that you have for a reviewer
https://github.com/turingschool/front-end-curriculum/issues/612