What does the author mean by "event handler function wants to unbind itself after it fires"

Viewed 97

I'm currently studying JavaScript by following the book series "you don't know js"

In the scope & closure section of the book, when discussing naming function expressions, the author mentioned.

Without a name, if the function needs to refer to itself, for recursion, etc., the deprecated arguments.callee reference is unfortunately required. Another example of needing to self-reference is when an event handler function wants to unbind itself after it fires.

Because I am relatively inexperienced at JavaScript, I'm not really sure what "event handler function unbinding" is (I know what "event handler function" is) and how it works.

So I was just wondering if someone could explain it; what it actually does? (a code sample would be even better).

1 Answers
Related