문서의 이전 판입니다!
// Create an object let person = { firstName: "Elizabeth", lastName: "Ollsen", id: 5566, fullName: function () { return this.firstName + " " + this.lastName; } }; // Display data from the object: document.getElementById("demo").innerHTML = person.fullName(); // Elizabeth Ollsen console.log(person); // {firstName: "Elizabeth", lastName: "Ollsen", id: 5566, fullName: ƒ}