每日一题
const user = { name: “Lydia”, age: 21 };
const admin = { admin: true, …user };
console.log(admin);
A: { admin: true, user: { name: “Lydia”, age: 21 } }
B: { admin: true, name: “Lydia”, age: 21 }
C: { admin: true, user: [“Lydia”, 21] }
D: { admin: true
扩展运算
原创
2021-03-28 23:05:23 ·
134 阅读 ·
0 评论