Node.js: What is the context of the `this` operator when used in module scope?
<p><strong>The code</strong></p>

<p>I write the following code and save it as test.js:</p>

<pre><code>var foo = 'I am local';
global.foo = 'I am global';

function print () {
     console.log(this.foo);
};

print(); 
console.log (this.foo); 
</code></pre>

<p>I then run it in the terminal with the command <code>node test.js</code> and it returns:</p>

<pre><code>I am global
undefined
</code></pre>

<p><strong>The question</strong></p>

<p>Why does it not return:</p>

<pre><code>I am global
I am global
</code></pre>

<p>?</p>