Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Callback is facility to save a piece of code so that it may be invoked later in the current environment (Typically in response to an event)

Callback is a piece of code that is stored or registered in a higher layer or a different object such that the piece of code being stored has access to the information available in the current context. The registrar has the ability to invoke the code later in response to some event so that the action performed has access to all the environment available at the time of creation of callback (Thus calling back to the original code).