1const person = { 2 firstName: "Lydia", 3 lastName: "Hallie", 4 pet: { 5 name: "Mara", 6 breed: "Dutch Tulip Hound" 7 }, 8 getFullName() { 9 return `${this.firstName} ${this.lastName}`; 10 } 11}; 12 13console.log(person.pet?.name); 14console.log(person.pet?.family?.name); 15console.log(person.getFullName?.()); 16console.log(person.getLastName?.());
本题为“单选题”