title: Class Inheritance in Javascript
body: <p>I am wondering how to simulate Class Inheritance in JavaScript. I know class doesn't apply to JavaScript, the way we use is Functions to create objects and do the inheritance things through Prototype object.</p>
  
  <p>For example, how do you convert this structure into JavaScript :</p>
  
  <pre><code>public class Mankind {
      public string name;
      public string lastname;
  }
  
  public class Person: Mankind {
      public void Run(string fromWhat) {
          //write the run logic
      }
  }
  </code></pre>
  
  <p>What is the equivalent of this piece of code in JavaScript.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I've also found another link where Douglas Crockford explains different inheritance models as <a href="https://stackoverflow.com/questions/2129789/class-inheritance-in-javascript/2129800#2129800">CMS</a> does: <a href="http://javascript.crockford.com/inheritance.html" rel="nofollow noreferrer">Classical Inheritance in JavaScript</a>.</p>
  
  <p>Hope it helps others as well.</p>