title: ES6 class extending another class and calling super multiple times?
body: <p>I have a class Player and want to extend it to have a class Team.</p>
  
  <p>My logic would be:</p>
  
  <pre><code>class Player {
    constructor(name, age) { //class constructor
      this.name = name;
      this.age = age;
    }
  
    sayName() { //class method
      console.log('Hi, I am ', this.name + '.');
    }
    sayAge() {
      console.log('Hi, I am ', this.age + '.');
    }
  }
  
  class Team extends Player {
    constructor(members) {
      var players = [];
      for (var i = 0; i &lt; members; i++) {
        players.push(super(members[i].name, members[i].age));
  
      }
      this.players = players; // to not call "this" before super
    }
  
    teamNames() { 
      console.log(this.players);
    }
  }
  
  let p = new Player('John', 25);
  p.sayName(); // John
  
  var team = [{
    name: 'Jonh',
    age: 25
  },{
    name: 'Anna',
    age: 27
  }];
  var A_Team = new Team(team);
  A_Team.temNames();
  </code></pre>
  
  <h3>fiddle: <a href="http://www.es6fiddle.net/ik5s7ale/" rel="nofollow">http://www.es6fiddle.net/ik5s7ale/</a></h3>
  
  <p>But this gives errors and the class does not work. I understand calling <code>super</code> inside a loop is wrong, but what would be the solution here? Is the relation between these two classes not a "extend" situation, should I use/declare separated classes for this without extending?</p>