Difference between Object.create(foo) and new Object(foo)?
<p>Why is that this code:</p>

<pre><code>var foo = {one: 1, two: 2};
var bar = new Object( foo );
bar.three = 3;
bar.one = 100; 
document.write(bar.one); //100 
document.write(foo.one); //100
</code></pre>

<p>results in bar.one &amp; foo.one being both 100, while</p>

<pre><code>var foo = {one: 1, two: 2};
var bar = Object.create( foo );
bar.three = 3;
bar.one = 100; 
document.write(bar.one); //100
document.write(foo.one); //1
</code></pre>

<p>only affects bar.one..</p>

<p>My first intuition is that since in the first piece of code we are assigning a foo reference to bar, then it means the change will also apply to foo, while on the second code, it probably 'inherits' from foo, and therefore the change on bar's 'subclass' attribute won;t apply to its 'superclass' (prototype)..</p>

<p>Can somebody please confirm that my assumption is at least on the right track? Would absolutely appreciate any answers. Thanks in advance.</p>
