Browse - Programming Tips - javaScript: call a callback function

Date: 2019mar2
Language: javaScript

Q.  javaScript: call a callback function

A.  There is no special syntax you, do use it.
(The same as C/C++)

function workThenCallback(mycallback) { work(); mycallback(); // Just use the name and () }
function exampleUse() { workThenCallback(function() { console.log('Done'); }); }