객체
var person = {};
person.name = 'sla';
person.introduce = function(){
return 'My name is '+this.name;
}
console.log(person.introduce());var person = {
'name': 'sla',
'introduce': function(){
return `My name is `+this.name;
}
}
console.log(person.introduce());생성자(constructor)
객체 리터럴
생성자의 역할 - 초기화(init, initialize)
Last updated