const person = {
name: "John",
age: 30,
address: {
street: "123 Main St",
city: "New York",
state: "NY",
zip: "10001",
},
hobbies: ["reading", "painting", "swimming"],
greet: function () {
console.log(
`Hello, my name is ${this.name} and I'm ${this.age} years old.`
);
},
};
console.log(person.name);
console.log(person.address.city);
console.log(person.hobbies[1]);
person.greet();