Skip to content

变量的解构赋值

嵌套解构

javascript
const user = {

 id: 123,

 name: 'hehe'

};

const {

   education: {

       degree

   } = {}

} = user;

console.log(degree); //prints: undefined

更新: 2023-08-14 11:35:05
原文: https://www.yuque.com/u3641/dxlfpu/rqisri