代码
提交代码
const heroes = [ { name: '艾希', gender: 2 }, { name: '泰达米尔', gender: 1 } ] for (let { name } of heroes) { console.log(name) }
运行结果