javascript object literal and self-executing functions
<p>I'm studying object literals and self-executing functions in Javascript. Looking through some YUI code I came across some methods of an object literal that execute themselves. My question is why the following code does not alert 'Ohai Mark!';</p>

<pre><code>var bar = {
    alert: function () {
        window.alert('Ohai Mark!');
    },
    init: (function () {
        bar.alert();
    }())
};
</code></pre>

<p>Thanks in advance for your help! :)</p>
