title: How to execute a method passed as parameter to function
body: <p>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 method which is passed as an argument. Like Reflection.</p>
  
  <p>example code</p>
  
  <pre><code>function myfunction(param1, callbackfunction)
  {
      //do processing here
      //how to invoke callbackfunction at this point?
  }
  
  //this is the function call to myfunction
  myfunction("hello", function(){
     //call back method implementation here
  });
  </code></pre>