const person = {
name: 'Alice',
age: 25,
city: 'Wonderland'
};
const additionalInfo = {
age: 30,
occupation: 'Explorer'
};
const combined = {
...person,
...additionalInfo
};
console.log(combined.age);
Ответ:
30
JavaScript test | #JavaScript
JA JavaScript test @js_test · 9.72K subscribers
const person = {
name: 'Alice',
age: 25,
city: 'Wonderland'
};
const additionalInfo = {
age: 30,
occupation: 'Explorer'
};
const combined = {
...person,
...additionalInfo
};
console.log(combined.age);