title: Advanced javascript inheritance is failing - parent <- parent <- child
body: <p>I've been reading articles about bind, call, apply for almost a week now and it's still complex for me. I think I need them for this jsfiddle I wrote. However, I wasn't able to since I'm still confused.</p>
  
  <p>I tried my best to write a fiddle of what I heard last week from one of our developers experiencing the issue. He wanted to display the properties of classA from a new class(classC) he made but it wasn't showing the data.</p>
  
  <p>So here it goes.</p>
  
  <p>There is a parent object(classA) that contains the complete properties and methods. A child(subclass like classB) of it inherits the properties from classA so inherited data plus its own data can be rendered on classB's modal.</p>
  
  <p>Now, there is a requirement to add a new modal or section to display few properties from classA and properties from classB. So they made a new class called classC which inherits all information from classB. I remember they said, classC was inheriting all the properties and methods from classB but the properties it needs in classA weren't there.</p>
  
  <p>Please help me with my fiddle. It will help me become a better Javascript developer. Oh, I also remember they were mentioning things like 'call' and 'super' which I am not familiar yet.</p>
  
  <pre><code>function classA()  {
    this.firstname = 'Donna';
    this.lastname = 'Hill';
    function getFullname () {
      return firstname + ' ' + lastname;
    }
  }
  
  function classB() {
      var childofA = new classA();
      var age = 10;
      var sex = "female";
  
      var bObject = {
          showFullname : function() {
              console.log(this.childofA.getFullname);
          }
      }
      return bObject;
  }
  
  function classC() {
      var childofB = new classB();
      var cObject = {
          showFullname : function() {
              console.log(this.childofB.showFullname);
          }
      }
      return cObject;
  }
  
  var c = new classC();
  console.log(c.showFullname());
  </code></pre>
  
  <p><a href="http://jsfiddle.net/01hz8933/2/" rel="nofollow">http://jsfiddle.net/01hz8933/2/</a></p>