constructor(생성자)를 사용하면 인스턴스화된 객체에서 다른 메서드를 호출하기 전에
수행해야 하는 사용자 지정 초기화를 제공할 수 있습니다.
클래스를 new 를 붙여서  ( new User("marvel") ) 인스턴스 객채로 생성하면
넘겨받은 인수와 함께 constructor가 먼저 실행됩니다. 
이 때 넘겨받은 인수인 marvel이 this.name 에 할당 됩니다.
class User {
  constructor(name) {
    this.name = name;
  }
  sayHi() {
    alert(this.name);
  }
}
let user = new User("Marvel");
user.sayHi();
super 키워드는 자식 클래스 내에서 부모 클래스의 생성자를 호출할 때 사용됩니다.super 키워드는 자식 클래스 내에서 부모 클래스의 메서드를 호출할 때 사용됩니다.class Car {
  constructor(brand) {
    this.carname = brand;
  }
  present() {
    return `I have a ${this.carname}`;
  }
}
class Model extends Car {
  constructor(brand, mod) {
    super(brand);
    this.model = mod;
  }
  show() {
    return super.present() + ", it is a " + this.model;
  }
}
let myCar = new Model("Genesis", "GV80");
myCar.show();