📜  在javascript代码示例中遍历数组

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

代码示例3
let array = [ 1, 2, 3, 4 ]; //Your array

for( let element of array ) {
    //Now element takes the value of each of the elements of the array
    //Do your stuff, for example...
      console.log(element);
}