title: Inheritance using prototype / "new"
body: <p>Hi I'm new in Javascript OO and want to know more about about inheritance. Hope you can provide some advice!</p>
  
  <p>I see this great post:
  <a href="https://stackoverflow.com/questions/1595611/how-to-properly-create-a-custom-object-in-javascript/1598077">How to &quot;properly&quot; create a custom object in JavaScript?</a></p>
  
  <p>which talks about how a class is inherited as I see in other websites, ex.:</p>
  
  <pre><code>function man(x) {
      this.x = x;
      this.y = 2;
  }
  man.prototype.name = "man";
  man.prototype.two = function() {
      this.y = "two";
  }
  function shawn() {
      man.apply(this, arguments);
  };
  shawn.prototype = new man;
  </code></pre>
  
  <p>The above post claims that in order not to call "man"'s constructor while inheriting, one can use a helper like this instead:</p>
  
  <pre><code>function subclassOf(base) {
      _subclassOf.prototype= base.prototype;
      return new _subclassOf();
  }
  function _subclassOf() {};
  shawn.prototype = subclassOf(man);
  </code></pre>
  
  <p>While I understand its intention, I don't see why we can't call</p>
  
  <pre><code>shawn.prototype = man.prototype;
  </code></pre>
  
  <p>I see it works exactly the same. Or is there something I'm missing? Thanks in advance!</p>