How to use an anonymous function
So, we’re creating a function to handle the load event, but we know it’s a “one time” function because the load event only happens once per page load. We can also observe that the
window.onload property is being assigned a function reference—namely, the function reference in
handler. But because
handler is a one time function, that name is a bit of a was...
- 11. Anonymous Functions, Scope and Closures: Serious functions
- Publisher: O'Reilly Media, Inc.
- Released: March 2014
First example of how to use anonymous functions in event handling (one-time event)?