a:{m:1,n:2}
b:{k:2,n:2}
let c = Object.assign(a,b);
console.log(c);
console.log(a);
c:{m:1,n:2,k:2}
a:{m:1,n:2,k:2}
a:{m:1,n:2}
b:{k:2,n:2}
let c = Object.assign(a,b);
console.log(c);
console.log(a);
c:{m:1,n:2,k:2}
a:{m:1,n:2,k:2}
本文标题:Object.assign作用
本文链接:https://www.haomeiwen.com/subject/qtwlwctx.html
网友评论