'this' keyword in javascript returns differently
<p>Why does the <strong><code>this</code></strong> keyword express different values in the following code?</p>

<pre><code>var t = {
    a: "a",
    b: {
        c: "c",
        d: function () {
            return this;
        }
    },
    f: function () {
        return this;
    },
    g: this
}

var k = t.f(),
    l = t.g;

alert(k); // returns [object object] i.e 't'
alert(l); // returns [object DOMWindow] i.e 'window'
</code></pre>
