How to execute a javascript function passed as an argument to another function?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2868324/how-to-pass-and-call-a-function-as-an-argument-in-javascript">How to pass and call a function as an argument in Javascript?</a>  </p>
</blockquote>



<p>Is the code bellow correct for executing a function passed as an argument to another function? Or should the line <code>callback;</code> be replaced with <code>callback();</code>, or something else?</p>

<pre><code>function load(arg1, arg2, callback) {
    var s = arg1 + arg2;
    callback;
}
</code></pre>

<p>Also, would there need to be a different approach for passing anonymous functions as arguments? i.e.:</p>

<pre><code>load(1, 2, function(){ 
    // do something 
});
</code></pre>
