📜  如何在javascript代码示例中迭代数组

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

代码示例6
array = [ 1, 2, 3, 4, 5, 6 ]; 
   //set variable//set the stop count // increment each loop
for (let i = 0; i < array.length ;i++) { 
  
         array[i] //iterate through each index.
   //add the intructions you would like to perform.
    
             // add any method to array[
}