title: class inheritance and constructor
body: <p>Im trying to get the results as follows</p>
  <pre><code>let hobbes = new Employee(&quot;Hobbes&quot;, 1000000, &quot;Founder&quot;, null);
  console.log(hobbes.bonus(0.05)); // 50000
  
  let calvin = new Manager(&quot;Calvin&quot;, 130000, &quot;Director&quot;, &quot;Hobbes&quot;);
  console.log(calvin.bonus(0.05)); // 6500
  
  let susie = new Manager(&quot;Susie&quot;, 100000, &quot;TA Manager&quot;, &quot;Calvin&quot;);
  console.log(susie.bonus(0.05)); // 14000
  
  let lily = new Employee(&quot;Lily&quot;, 90000, &quot;TA&quot;, &quot;Susie&quot;);
  console.log(lily.bonus(0.05)); // 4500
  
  let clifford = new Employee(&quot;Clifford&quot;, 90000, &quot;TA&quot;, &quot;Susie&quot;);
  console.log(clifford.bonus(0.05)); // 4500
  </code></pre>
  <p>But I am confused on getting the salaries from the Managers employess. From theses classes. The instructions were. <em>You can extract the logic of calculating the total salary of all a manager's employees into a totalSubsalary() method.
  To do this, you can iterate through each of a manager's employees, checking if the employee is an instance of a Manager or not, and calculate the totalSubsalary.</em></p>
  <pre><code>class Employee {
    constructor(name, salary, title, bosss) {
      this.name = name;
      this.title = title;
      this.salary = salary;
      this.bosss = bosss;
    }
    bonus(multiplier) {
      return this.salary * multiplier;
    }
  }
  
  
  class Manager extends Employee {
    constructor(name, salary, title, employees) {
      super(name, salary, title);
      this.employees = employees;
    }
    bonus(multiplier) {
      return this.salary * multiplier;
    }
    totalSubSalary() {
      for (let key in this.employees) {
        const element = this.employees;
        console.log(this.name instanceof Manager);
      }
    }
  }
  </code></pre>