How does the "this" keyword in Javascript act within an object literal?
<p>I've seen <a href="http://stackoverflow.com/questions/133973/how-does-this-keyword-work-within-a-javascript-object-literal">How does &quot;this&quot; keyword work within a JavaScript object literal?</a>, but I don't see that it answers the following.</p>

<p>Given this code:</p>

<pre><code>var MyDate = function(date) {
    this.date = date;
};

var obj1 = {
    foo: new Date(),
    bar: new MyDate(this.foo)  //  this.foo is undefined
};

var obj2 = {};
obj2.foo = new Date();
obj2.bar = new MyDate(this.foo);  //  this.foo is undefined

var obj3 = {
    foo: new Date(),
    bar: new MyDate(obj3.foo)
};

var obj4 = {};
obj4.foo = new Date();
obj4.bar = new MyDate(obj4.foo);
</code></pre>

<p>Why do the first two attempts fail, but the last two work?  If <code>this</code> isn't bound to the current object literal, what <em>is</em> it bound to?</p>
