📅  最后修改于: 2022-03-11 14:55:41.052000             🧑  作者: Mango
let colors = ['Red', 'Green', 'Blue'];
for (const [index, color] of colors.entries()) {
console.log(`${color} is at index ${index}`);
}Code language: JavaScript (javascript)