생성자 함수에서는 new를 사용하는데
new 란 빈 객체를 만들어준다.
프로토 타입이 누군지도 알려줍니다.
-> 프로토 타입은 상속을 위한 것
생성자 함수의 이름은 첫 번째가 대문자인 게 관례function Person(name,age){ this.name = name; this.age = age; this.greet = function(){ console.log(`안녕 나는 ${this.name}`); }; } const person1 = new Person('ricker',100); const person2 = new Person('rick',200); console.log(person1.name,person.age); person2.greet();