function Profile (name, age) {
this.name = name;
this.age = age;
this.introduce = function () {
return `안녕하세요, ${this.age}세 ${this.name}입니다!`;
}
}
const people = new Profile('짱구' ,5)
console.log(people)
instrument.ts:113 Profile {name: '짱구', age: 5, introduce: ƒ}
암묵적으로 this 반환
return 값이 없어도 this 객체 반환