Callbacks are functions that are executed asynchronously, or at a later time. Instead of the code reading top to bottom procedurally, async programs may execute different functions at different times based on the order and speed that earlier functions like http requests or file system reads happen. (ref:art-of-node#callbacks)
Best explanation I found:
Key points noted are:
- explicitly making sure callback is a function before use. (typeof(callback) === ‘function’)
- callback executes after the asynchronous action begins, but NOT before it completes (Not always) (ex: callback-timing.js).