Difference between node.js and chrome in v8
<p>chrome version 49.0.2623.110 m</p>

<p>node v5.10.0</p>

<p>Here is my code:</p>

<pre><code>var a = 0;

(function() {
    this.a = 1;
    this.b = 2;
    console.log(a);
} )();

console.log(a);
console.log(b);
</code></pre>

<p>chrome gives</p>

<pre><code>1
1
2
</code></pre>

<p>node gives</p>

<pre><code>0
0
2
</code></pre>

<p>Why does that happen?</p>

<p>Thanks</p>