프로토타입을 이용한 객체 확장
function Person() {}
Person.prototype.hello = function () {
console.log('hello');
}
function Korean(region) {
this.region = region;
this.where = function () {
console.log('where', this.region);
}
}
Korean.prototype = Person.prototype;
const k = new Korean('Seoul');
k.hello();
k.where();
console.log(k instanceof Korean);
console.log(k instanceof Person);
console.log(k instanceof Object);

객체 리터럴
const a = {}
console.log(a, typeof a)
const b = {
name: 'mark'
};
console.log(b, typeof b)
const c = {
name: "mark",
hello1() {
console.log('hello1', this);
},
hello2: function () {
console.log('hello2', this);
},
hello3: () => {
console.log('hello3', this);
}
};
c.hello1()
c.hello2()
c.hello3()

표준 내장 객체
const a = new Array('red', 'black', 'white');
console.log(a, typeof a)
console.log(a instanceof Array)
console.log(a instanceof Object)
const b = ['red', 'green', 'yellow'];
console.log(b, typeof b);
console.log(b instanceof Array);
console.log(b instanceof Object);
console.log(b.slice(0, 1));
console.log(Array.prototype.slice, Object.prototype.slice);
