A callback is A reference to executable code, or a piece of executable code, that is passed as an argument to other code or function that is to be executed after another function has finished executing.
In computer programming, a callback, also known as a "call-after" function, is any executable code that is passed as an argument to other code that is expected to call back (execute) the argument at a given time. This execution may be immediate as in a synchronous callback, or it might happen at a later time as in an asynchronous callback. Programming languages support callbacks in different ways, often implementing them with subroutines, lambda expressions, blocks, or function pointers.
Let take an example of Callback function() examples.
Top comments (0)