Inheritance Patterns
1. __proto__, constructor, prototype 의 관계
prototype 이란 함수와 new 를 통해 원본 함수를 상속 받는 new 인스턴스를 생성하는 것.
예시 코드
function Car(name,price){
this.name = name
this.price = price
}
var morning = new Car('morning',1) // = > Car {name: "morning", price: 1}
같은 프로퍼티를 참조하는 상속 객체를 쉽게 만들어낼 수 있고
function Morning(){}
Morning.prototype.price = 1;
Morning.prototype.size = 'small'
var Mo1 = new Morning() // Morning{}
var Mo2.price // 1
var Mo3 = new Morning() // 'small'
공통적으로 price 와 size 라는 프로퍼티를 공유해서 사용할 수 도 있다.

함수와 객체 prototype ,__proto__생성의 관계.
prototype 을 위해 함수가 정의되면 해당함수에 Constructor = 생성자 자격이 생성된다.
(Constructor는 Prototype Object와 같이 생성된 함수를 가리킨다)
생성된 함수는 Prototype 속성으로 Prototype Object에 접근할 수 있다.
Prototype Object는 기본적인 객체와 같으며 속성으로 Constructor와 __proto__를 갖고있다.
이러한 이유로 함수만 new 키워드를 사용할 수 있는 이유가 된다.
(Constructor 자격이 부여되면 new를 통해 객체를 만들어 낼 수 있다. )
What is ' _proto__ ' ?
Mo1과 Mo2는 price 와 size 라는 프로퍼티를 직접 가지고 있지 않지만 __proto__ 통해서
Moring.prototype 의 속성에 접근할 수 있다.
원본함수에서 prototype을 생성 prototype 객체가 constructor와 __proto__ 를 가지고 원본함수를 참조
new 를 통해 생성된 생성자의 __proto__ 로 원본함수를 참조할 수 있다.

console 로 확인해본 결과값.
