this context changes while assigning
<p>This question is from <a href="http://dmitrysoshnikov.com/ecmascript/the-quiz/" rel="nofollow">ECMA-262</a> quiz</p>

<pre><code>var x = 100;
var foo = {
  x: 50,
  bar: function(){
    return this.x;
  }
}
console.log(foo.bar()); //returns 50
console.log((foo.bar = foo.bar)()); //returns 100
</code></pre>

<p>How does the <code>this</code> context changes in the second <code>console</code> statement ? or in general what object does equals to(assigning) operation returns the global object ?</p>
