[Core JavaScript] 6. prototype
1. 프로토 타입 프로토 타입은 모두 객체 (숫자형, 문자형, 배열, 함수든 할것없이 모든 데이터 타입 [1,2,3].constructor = [1,2,3].[[Prototype]].constructor = Array.prototype.contructure = Array function Person(n, a){ this.name = n; this.age = a; } var roy = new Person('로이', 30); var royClone1 = new roy.__proto__.contructor('로이_클론1', 10); var royClone2 = new roy.contructor('로이_클론1', 25); var royClone3 = new Object.getPrototypeOf(roy).con..
2021. 8. 29.