title: Javascript inheritance: calling Object.create when setting a prototype
body: <p>I'm learning some aspects of Object-oriented Javascript. I came across this snippet </p>
  
  <pre><code>var Person = function(firstName, lastName)
  {
    this.lastName = lastName;
    this.firstName = firstName;
  };
  
  Object.defineProperties(Person.prototype, {
    sayHi: {
      value: function() {
        return "Hi my name is " + this.firstName;
      }
    },
    fullName: {
      get: function() {
        return this.firstName + " " + this.lastName;
      }
    }
  });
  
  var Employee = function(firstName, lastName, position) {
    Person.call(this, firstName, lastName);
    this.position = position;
  };
  
  Employee.prototype = Object.create(Person.prototype);
  
  var john = new Employee("John", "Doe", "Dev");
  </code></pre>
  
  <p>And my question is: why does this snippet use
  Object.create(Person.prototype)? Shouldn't we simply reset prototype with:</p>
  
  <pre><code>Employee.prototype = Person.prototype;
  </code></pre>