📜  javascript 枚举 - Javascript 代码示例

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

代码示例1
const foobar = ['A', 'B', 'C'];

for (const [index, element] of foobar.entries()) {
  console.log(index, element);
}