1 对res的处理
let res={
status:200,
id:200,
data:[{name:'bob'},{name:'aa'}]
}
let {status,id,data} = res;
2 对Math的处理
let {pow,floor} = Math;
console.log(pow(2,3))//8
3 对长度的处理
let {length} = 'yo.'
console.log(length)//3
let res={
status:200,
id:200,
data:[{name:'bob'},{name:'aa'}]
}
let {status,id,data} = res;
let {pow,floor} = Math;
console.log(pow(2,3))//8
let {length} = 'yo.'
console.log(length)//3