I want to write my own function in JavaScript which takes a callback method as a parameter and executes it after the completion, I don\'t know how to invoke a method in my m
function myfunction(param1, callbackfunction) { //do processing here callbackfunction(); // or if you want scoped call, callbackfunction.call(scope) }