javascript const animal = { eats: true, speak() { console.log("동물 소리"); } }; const dog = { barks: true }; // dog의 프로토타입을 animal으로 설정 Object.setPrototypeOf(dog, animal); dog.speak(); // "동물 소리" 출력 java…
검색 결과
검색어를 입력하세요.
검색어를 입력하세요.
javascript const animal = { eats: true, speak() { console.log("동물 소리"); } }; const dog = { barks: true }; // dog의 프로토타입을 animal으로 설정 Object.setPrototypeOf(dog, animal); dog.speak(); // "동물 소리" 출력 java…