Class
class Person {
constructor(name) {
this._name = name;
}
sayHi() {
console.log(`Hi, ${this._name}!`);
}
}
const me = new Person('Park');
me.sayHi();
console.log(me instanceof Person);contructor
멤버변수
this
호이스팅(Hoisting)
getter
setter
정적 메소드
클래스 상속(Inheritance)
기타
Last updated