ga-wdi-boston / js-array-iteration-methods

JavaScript Array methods
Other
1 stars 160 forks source link

What's a callback #7

Closed gaand closed 8 years ago

gaand commented 8 years ago

Rename callbacks (see: ga-wdi-boston/js-array-methods-diagnostic/issues/64).

Distinguish functions/methods taking handlers/callbacks and the handlers.callbacks themselves (see ga-wdi-boston/js-functions-ins-and-outs/issues/11).

"A callback/handler is a function passed to another function/method that is called by that function/method."

"A handler/callback is a function passed to another function/method that is stored and called after the function/method to which is was passed returns."

GA-MEB commented 8 years ago

Proposal : "A callback is a function that gets passed into a second function as an argument, so that the second function can invoke it."

jrhorn424 commented 8 years ago

I'm ok with any of these wordings, though simpler is probably better.

Whatever the wording, this sentence should be accompanied with a diagrammed code example on the board with correspondence arrows between the explanation sentence and the example code.

laurenfazah commented 8 years ago

updated readme with callback explanation @gaand @MattB-GA-Boston @jrhorn424 if this is good to close

gaand commented 8 years ago

@J-Weeks If confusion prevails, please reopen after Monday.