let student={
age: 21,
name: 'yue',
sex: "女"
}
// func1:挑出几个需要的
const param = (({name,sex}) => ({name, sex}))(student)
console.log(param) // {name: "yue",sex: "女"}
// func2:删除几个不需要的
let {age,...params} = student
console.log(params) // {name: "yue",sex: "女"}
原文链接:https://blog.csdn.net/weixin_42243479/article/details/102501721