javascript之array forEach遍历

发布时间:2026/5/21 3:06:58

javascript之array forEach遍历 let a[A,B,C];a.forEach(function(element,index,array){// element: 指向当前元素的值// index: 指向当前索引// array: 指向Array对象本身console.log(${element},index${index}value${array[index]});});

相关新闻