title: Using Object.create for inheritance?
body: <p>This code is from the MDN article on <code>Object.create()</code>:</p>
  
  <pre><code>// Shape - superclass
  function Shape() {
    this.x = 0;
    this.y = 0;
  }
  
  // superclass method
  Shape.prototype.move = function(x, y) {
    this.x += x;
    this.y += y;
    console.info('Shape moved.');
  };
  
  // Rectangle - subclass
  function Rectangle() {
    Shape.call(this); // call super constructor.
  }
  
  // subclass extends superclass
  Rectangle.prototype = Object.create(Shape.prototype);
  Rectangle.prototype.constructor = Rectangle;
  
  var rect = new Rectangle();
  </code></pre>
  
  <p>The third to last line is the one that I'm confused about.</p>
  
  <p>What would be the difference between:</p>
  
  <p>A. how it is now.<br>
  B. <code>Rectangle.prototype = Object.create(Shape);</code><br>
  C. <code>Rectangle.prototype = new Shape();</code> </p>
  
  <p>Wouldn't all 3 ultimately yield the same result? The same attributes defined on <code>rect</code> and the same use of memory to define them?</p>
  
  <p><strong>Yes</strong>, I have read the other StackOverflow questions addressing <code>Object.create()</code>. <strong>No</strong>, they did not fully address my confusion.</p>