📜  对于每个带有箭头函数的循环 - Javascript 代码示例

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

代码示例1
someValues.forEach((element) => {
    console.log(element);
});

OR

someValues.forEach((element, index) => {
    console.log(`Current index: ${index}`);
    console.log(element);
});