📜  jsdoc 对象解构 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:17.750000             🧑  作者: Mango

代码示例2
const hero = {
  name: 'Batman',
  realName: 'Bruce Wayne',
  address: {
    city: 'Gotham'
  }
};

// Object destructuring:
const { realName, address: { city } } = hero;
city; // => 'Gotham'