title: How to implement classical class inheritance through prototypes
body: <p>I would like to implement the following behavior in JS. <strong>Please note that the syntax is symbolic.</strong></p>
  
  <p>This is my parent class</p>
  
  <pre><code>class = TList {
     FList: array;
  
     function AddElement(Ele) {
          Flist.Add(Ele)
     };
  
     function RemoveEle(Ele) {
          FList.Remove(Ele)
     };   
  }
  </code></pre>
  
  <p>Now I'm going to inherit from this class. My child class should automatically have all the properties of the parent and should be able to extend them without rewriting the code.</p>
  
  <pre><code>class = TAlertList(inherit from TList) {
  
     function AddElement(Ele) {
        Alert('element will be added');
        call.parent.AddElement(Ele)
     };
  
     function RemoveElement(Ele) {
       call.parent.RemoveElement(Ele);
       Alert('element removed');
     }
  
  }
  </code></pre>
  
  <p>Please note how I inherit the parent methods at places I wish. </p>
  
  <p>Now I should be able to create an object from my child class and do the following.</p>
  
  <pre><code>MyAlertList = new TAlertList;
  MyAlertList.Add('hello');
  console.log(MyAlertList.FList);
  </code></pre>
  
  <p>I should be able to inherit more child classes from TAlertList and be able to change the existing behavior. I need to do this in pure ES5 without using any libraries. Standard OOP practices are expected.</p>