Function - Callback function

1 - About

A callback function is called back by the higher-order function that takes it as parameter.

callbacks is the javascript primary method of enabling asynchrony (asynchronous operation).

3 - Example

callback = function () {
   console.log("Hello Callback");
}
 
function highOrder(callbackFunctionToCall){
  // Call the callback function
  callbackFunctionToCall();
}
 
highOrder(callback);

code/function/callback.txt · Last modified: 2018/03/28 21:29 by gerardnico