Scope of this in javascript function
<p>If you have the following code:</p>

<pre><code>var global = this;
function A () {
    function B () {
        return this;
    }
    return B();
}
var C = new A();
C === global // true
</code></pre>

<p>Why does the <code>this</code> in function B refer to the global space and not the <code>this</code> of the object A?</p>
