ga-wdi-boston / js-functions-ins-and-outs

JavaScript Function Arguments and Return Values.
Other
2 stars 174 forks source link

Students were really stuck on partial application #6

Closed jrhorn424 closed 8 years ago

jrhorn424 commented 9 years ago

Students were really stuck on partial application, even though the code-along was framed as a focus on a function returning another function. Is there another example we could use that doesn't rely on two parameters partially applied? Maybe a static function returned?

Not able to finish with virtual property example.

gaand commented 9 years ago

So, this is about functions returning functions not virtual properties?

Maybe scaffold with an example that shows that the function returned is always a new object, then the closure bit?

I've been thinking about the closure a bit and I'm wondering if presenting it as the function and attached data might help. Drawing a picture of the function coming back with the variables attached.

Or maybe it's just too soon.

jrhorn424 commented 8 years ago

I think this extra demo on closure went really well. Should speed things up a bit when we talk about attaching functions to the DOM.