const healthObj = {
showHealth : function() {
console.log(`오늘 운동시간 : ${this.healthTime}`);
}
}
const myHealth = Object.assign(Object.create(healthObj), {
name : "nsunny",
lastTime : "11:20"
});
console.log(myHealth);
const previousObj = {
name : "nsuny",
lastTime : "11:20"
}
const myHealth = Object.assign({}, previousObj, {
lastTime : "11:20" ,
});
console.log(myHealth);