title: Calling base class function - class inheritance in JavaScript
body: <p>Please check out the following example: </p>
  
  <pre><code>MyBaseClass = function(a) {
       this.a = a;
  };
  
  $.extend(MyBaseClass.prototype, {
      init: function() {
          console.log('I am initializing the base class');
      }
  });
  
  MyChildClass = $.extend(MyBaseClass, {
      init: function() {
          MyBaseClass.prototype.init();
          console.log('I am initializing the child class');
      }
  });
  
  var = new MyChildClass();
  var.init();
  </code></pre>
  
  <p>Тhis should output both 'I am initializing the base class' and 'I am initializing the child class'.</p>
  
  <p>I need to be able to inherit the class MyBaseClass, but still to be able to call his init() method at the beginning of the new init() method.</p>
  
  <p>How do I do that?</p>