JavaScript Callbacks
A callback is a function which is passed as an argument to another function.The function that takes the callback as an argument is called as a “higher-order function”. These functions  are used  mostly in asynchronous function when we need to wait for the response. In below example display is passed as callback function to sum …