title: Replicating constructors and new with Object.create()
body: <p>From my limited experience with OOP javascript, a common way to handle multiple objects with different properties but the same methods would be using a constructor as follow:</p>
  
  <pre><code>function Animal ( type ) {
      this.type = type
  };
  Animal.prototype.sayHello = function () {
      return 'Hi, I am a ' + this.type
  };
  var goat = new Animal( 'Goat' );
  </code></pre>
  
  <p>My understanding here is <code>goat</code> would inherit / have a reference to the functions of <code>Animal</code>.</p>
  
  <p>I <em>presume</em> I can replicate the above with the following object literal notion:</p>
  
  <pre><code>var Animal = {
      type : '',
      sayHello : function () {
          return 'Hi, I am a ' + this.type
      }
  }
  var goat = Object.create( Animal );
  goat.type = 'Goat';
  </code></pre>
  
  <p>Is the inheritance to <code>Animal</code> lost here, or is <code>Goat</code> still referencing <code>Animal</code> for methods?</p>
  
  <p>I would like to know if there are any issue using <code>Object.create()</code> instead of <code>new</code> to replicate a constructor / class. Is there a perf offset or any reason to carry on using <code>new</code>?</p>
  
  <p>Any advice would be appreciated, I am happy to add to the question if clarification is needed.</p>
  
  <p><strong>Updated Object Creation</strong></p>
  
  <pre><code>var Animal = {
      sayHello : function () {
          return 'Hi, I am a ' + this.type
      }
  }
  var goat = Object.create( Animal, { 'type' : { value: 'goat' } } );
  </code></pre>