1const person = { 2 name: "Lydia", 3 age: 21 4} 5 6const changeAge = (x = { ...person }) => x.age += 1 7const changeAgeAndName = (x = { ...person }) => { 8 x.age += 1 9 x.name = "Sarah" 10} 11 12changeAge(person) 13changeAgeAndName() 14 15console.log(person)
本题为“单选题”