easierbycode
4/29/2016 - 7:50 PM

new.target points to the initial constructor

new.target points to the initial constructor

class Project {
  constructor() {
    console.log( new.target );
  }
}

class SoftwareProject extends Project {
  constructor() {
    super();
  }
}

var sp = new SoftwareProject();
// constructor() {
//    super();
//  }