title: strange observation on IIFE in node.js (Windows)
body: <p>Is the below behavior expected for nodejs? It looks buggy to me. If not what am I missing? </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var abc = function(){
  console.log("hello");
  }
  
  (function(){
    console.log("welcome");
  })();</code></pre>
  </div>
  </div>
  </p>
  
  <p>I get the below exception</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>TypeError: undefined is not a function
      at Object.&lt;anonymous&gt; (C:\node\main.js:8:3)
      at Module._compile (module.js:460:26)
      at Object.Module._extensions..js (module.js:478:10)
      at Module.load (module.js:355:32)
      at Function.Module._load (module.js:310:12)
      at Function.Module.runMain (module.js:501:10)
      at startup (node.js:129:16)
      at node.js:814:3</code></pre>
  </div>
  </div>
  </p>
  
  <p>If I alter the code to </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var abc = function(){
  console.log("hello");
  }
  
  (function(){
    console.log("welcome");
  }());</code></pre>
  </div>
  </div>
  </p>
  
  <p>it produces </p>
  
  <blockquote>
    <p>welcome
    hello</p>
  </blockquote>
  
  <p>I'm forced to believe node parsing mistakenly assumes <strong>nested IIFE (function(){...})())</strong> executed first and and outer () of IIFE triggers execution of function definition above it (it does not matter if I introduce a comment line in between abc definition and IIFE).</p>