In JavaScript is there a difference between referencing an object's variable name vs. using `this` when declaring new key:value pairs of the object?
<p>In JavaScript is there a difference between referencing a object's variable name vs. using <code>this</code> when declaring new key:value pairs of the object?</p>

<pre><code>    var foo = {
      bar: function() {
        foo.qux = 'value';
      }
    };

    alert(foo.qux); // undefined
    foo.bar();
    alert(foo.qux); // 'value'

    var foo = {
      bar: function() {
        this.qux = 'value';
      }
    };

    alert(foo.qux); // undefined
    foo.bar();
    alert(foo.qux); // value
</code></pre>

<p>Also: <a href="http://jsbin.com/emayub/9/edit" rel="nofollow">http://jsbin.com/emayub/9/edit</a></p>
