A closure is basically an inner/nested function. What are some of the most common examples of nested functions in popular js frameworks? In what scenarios would you choose to write a custom closure?
Asked
Active
Viewed 84 times
0
-
`$(document).ready(function() { ... })` is probably the most widely-used closure ever. – Niet the Dark Absol Jun 23 '16 at 17:07
-
Umm read your school book. – Adam Buchanan Smith Jun 23 '16 at 17:10
-
Look up "scope" and "variables" while trying to understand "closures" – Adam Buchanan Smith Jun 23 '16 at 17:13
-
This isn't a bad question. The problem is "the question doesn't show any research effort". Also saying "read your school book" is not helpful. – Ram Jun 23 '16 at 17:18