how to pass function in javascript function code example
Example: javascript pass function as parameter
//passing a function as param and calling that function
function goToWork(myCallBackFunction) {
//do some work here
myCallBackFunction();
}
function refreshPage() {
alert("I should be refreshing the page");
}
goToWork(refreshPage);