📅  最后修改于: 2022-03-11 15:01:39.853000             🧑  作者: Mango
var obj1 = {
foo: {
prop1: 42,
},
};
var obj2 = {
foo: {
prop2: 21,
},
bar: {
prop3: 10,
},
};
var result = {
foo: { // `foo` got overwritten with the value of `obj2`
prop2: 21,
},
bar: {
prop3: 10,
},
}