Difference between foo() and function() { foo(); }
<p>Is there any advantage of wrapping a function with an anonymous function?
I mean a particular example:</p>

<pre><code>function asyncFuntion(callback) {
    setTimeout(callback, 6000);
};

asyncFuntion(function() {
    console.log('Calling after 6 s.');
});   
</code></pre>

<p>and with the wrapped function:</p>

<pre><code>function asyncFuntion(callback) {
    setTimeout(function() {
        callback();
    }, 6000);
};

asyncFuntion(function() {
    console.log('Calling after 6 s.');
});
</code></pre>

<p>In both cases output is the same. So is there any difference?
The second version is what I found learning js.
I realize that such a form is useful when we need closures but here? </p>
