var target = { name: "zhaoqian", age: 26 };
var source1 = { age: 27, location: "China" };
var source2 = { location: "China Beijing" };
Object.assign(target, source1, source2);
console.log(target);
js 对象的赋值与替换 Object.assign
猜你喜欢
转载自blog.csdn.net/qq_39822451/article/details/89378320
今日推荐
周排行