JQuery callback function flow
<p>i am very new in jquery. so i was searching google for jquery callback function and i got a code but i did not understand the flow of the code. so please anyone help me to understand the coding flow.</p>

<p>here is the code</p>

<pre><code>function mightyplugin(foo, callback){
// big code block here

   callback.apply(this, [foo]);
}

mightyplugin("Bar!", function(param){
    alert(param);
});
</code></pre>

<p>here i am passing <code>"Bar!"</code> as one argument to function <code>mightyplugin</code> and a anonymous function.</p>

<ol>
<li>what <code>callback.apply</code> does. what <code>this</code> keyword will hold actually.... why it is required.</li>
<li>why <code>[foo]</code> is passed as array. </li>
<li><p>what would be the syntax if i pass many argument like</p>

<pre><code>mightyplugin("Bar!","1stone","2ndone", function(param){
    alert(param);
});
</code></pre></li>
</ol>

<p>i know callback function invoke when first function finish but here situation is different... why?</p>

<p>please explain...<br>
thanks</p>
