const person = {
name: 'job',
age: '12',
height: '178',
work: 'palying'
}
const { work, ...newPerson } = person;
console.log(newPerson);
// {
// name: 'job',
// age: '12',
// height: '178',
// }
const person = {
name: 'job',
age: '12',
height: '178',
work: 'palying'
}
const { work, ...newPerson } = person;
console.log(newPerson);
// {
// name: 'job',
// age: '12',
// height: '178',
// }
本文标题:解构删除一个对象属性
本文链接:https://www.haomeiwen.com/subject/iuijcltx.html
网友评论