상속, prototype
상속, prototype; const user = { name: "Mike", }; user.name; // "Mike" user.hasOwnProperty("name"); // true user.hasOwnProperty("age"); // false const user = { name: "Mike", hasOwnProperty: function () { console.log("haha"); }, }; user.hasOwnProperty(); // "haha" const car = { wheels: 4, drive() { console.log(drive); }, }; const bmw = { color: "red", navigation: 1, }; const benz = { color: "black",..
2021. 7. 13.