Invoke and define JavaScript function in same statement
<p>Is this the correct way:</p>

<pre><code>(function() { 
   // do something here
}()); 
</code></pre>

<p>Or this way:</p>

<pre><code>(function() { 
       // do something here
    })(); 
</code></pre>
