프로토타입 Prototype
다음 코드를 실행했을 때 prototype과 함께 인스턴스가 생성되는 과정은?
var instance = new Constructor();
어떤 생성자 함수(Constructor)를 new 연산자와 함께 호출하면 Constructor에서 정의된 내용을 바탕으로 새로운 인스턴스가 생성됩니다. 이때 instance에는 __proto__라는 프로퍼티가 자동으로 부여되는데, 이 프로퍼티는 Constructor의 prototype이라는 프로퍼티를 참조...
euijin.hashnode.dev2 min read