📜  嵌套 for 循环 javascript 代码示例

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

代码示例3
//nested for loop     
var arr = [[1,2], [3,4], [5,6]];
 for (var i = 0; i < arr.length; i++) {
  for (var j = 0; j < arr[i].length; j++) {
    console.log(arr[i][j]);
  }
}