Delete an attribute in an object

1. Use es6 to mention

let a={name:12,age:234,msg:"时空裂缝就算了"}
let {name,...ab}=a
console.log(a) // {name: 12, age: 234, msg: '时空裂缝就算了'}
console.log(ab) //{age: 234, msg: '时空裂缝就算了'}

method of supply

Guess you like

Origin blog.csdn.net/CMDN123456/article/details/130894531