title: prototype chain in javascript
body: <p>Suppose I have two constructor function:</p>
  
  <pre><code>var Person = function(xx,xx,xxx,xxxxxxx) {
    //Person initialization
  }
  
  var Man = function(xx,xx,xxx,xxx) {
    //Man initialization
  }
  </code></pre>
  
  <p>And I want Man extends from Person.</p>
  
  <p>The following is what I thought:</p>
  
  <p>Given a created Man object:</p>
  
  <pre><code>var m=new Man("xx",....);
  </code></pre>
  
  <p>1) when a property of <code>m</code> is accessed,it will search it in <code>Man.prototype</code>.</p>
  
  <p>2) If not find, It should find it in <code>Man.prototype.__prop__</code>.</p>
  
  <p>So what I have do is make the <code>Man.prototype.__prop__</code> linked to <code>Person.prototype</code>.</p>
  
  <p>I know this is the common way:</p>
  
  <pre><code>function inherit(superClass) {
      function F() {}
      F.prototype = superClass.prototype;
      return new F;
  }
  Man.prototype=inherit(Person);
  </code></pre>
  
  <p>But when I try this:</p>
  
  <pre><code>Man.prototype.prototype=Person.prototype.
  </code></pre>
  
  <p>Why it does not work?</p>