But, the callback “captures” the values of addThumbClickHandler’s variables and parameters. The callback uses these captured values when it runs.
- For the More Curious: Closures
- from Front-End Web Development: The Big Nerd Ranch Guide
- Publisher: Big Nerd Ranch Guides
- Released: July 2016
Just like the "Block" in Objective-C which captures the outer variables.
Share this highlighthttp://www.safaribooksonline.com/a/front-end-web-development/5196322/