A callback
function is a function that:
- is passed to another function as an argument and only called in its code.
- contains a reference to itself in its code.
- is always executed at fixed intervals.
- is always called with a certain pre-defined delay.
Explanation & Hint:
A callback function is a function that is passed as an argument to another function and is invoked or called by that function at a specific point in its execution. The primary purpose of a callback function is to provide a mechanism for executing code asynchronously or to allow behavior customization of a function. |