1. 用es6 提
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: '时空裂缝就算了'}
供的方法
1. 用es6 提
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: '时空裂缝就算了'}
供的方法