const healthObj = { showHealth: function() { console.log("오늘 운동시간:" + this.helthTime); }, setHealth: function(newTime){ this.helthTime = newTime } } const previousObj ={ name: "crong", lastTime: "11:20" }; const myHealth = { "name": "honux", "lastTime": "12:30", }; //set prototypeOf Object.setPrototypeOf(myHealth,healthObj); console.log(myHealth);...
ES6 Object.setPrototypeOf에 대한 요약내용입니다.
자세한 내용은 아래에 원문링크를 확인해주시기 바랍니다.
#es6
#Object
원문링크 : ES6 Object.setPrototypeOf