Newbie: Need some explanation on this js code
<p>I am learning javascript, and I have read <a href="http://javascript.crockford.com/prototypal.html" rel="nofollow">somewhere</a> the following code:</p>

<pre><code>if (typeof Object.create !== 'function') {
    Object.create = function (o) {
        function F() {}
        F.prototype = o;
        return new F();
    };
}
newObject = Object.create(oldObject);
</code></pre>

<p>I understand that the <code>Object.create</code> function return a new object which inherited the object '<strong>o</strong>' that has been passed as a parameter to the <code>Object.create</code> function. But, I don't understand what is the sense to make this? I mean, even the <code>Object.create</code> function returned a new object, but the new object and the old object has no difference. Even new object inherit old one, there are no new methods defined in the new object. So, in what situation do we need the above code to get the new object??</p>
