O'Reilly logo
  • Ahmed Elgendy thinks this is interesting:

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...


Cover of Head First JavaScript Programming


First example of how to use anonymous functions in event handling (one-time event)?