const Dog = function () { this.name = "도리"; }; const dog1 = new Dog(); const dog2 = new Dog(); dog1.__proto__.sayHello = function () { console.log("헬로우 도리"); }; // 이건 dog1 dog2둘다 사용가능 dog1.__proto__ = { sayHello() { console.log("헬로우 무찌"); }, }; //이건 dog1꺼만 바꿈. // dog1.sayHello(); dog2.sayHello(); const Dog = function () { this.name = "도리"; }; const dog1 = new Dog(); Dog.prototype = { sayHello() ..