let student = {
age: 20,
name: "王璨璨",
sex: "男",
};
// func1:
const param = (({ name, sex }) => ({ name, sex }))(student);
console.log(param); //{ name: '官人', sex: '男' }
利用匿名函数解构返回获取
let student = {
age: 20,
name: "王璨璨",
sex: "男",
};
// func1:
const param = (({ name, sex }) => ({ name, sex }))(student);
console.log(param); //{ name: '官人', sex: '男' }
利用匿名函数解构返回获取