Are these way to define function in javascript equal?
<p>I was wondering if the following way of writing function in javascript are equal.</p>

<p>To me it seems they produce the same result, but in what they can be different?</p>

<p>First way:</p>

<pre><code>(function(){
    alert('ciao')
})();
</code></pre>

<p>Second way:</p>

<pre><code>new function bar(){alert('ciao')}; 
</code></pre>
