Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nested loops js

 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]);
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #nested #loops #js
ADD COMMENT
Topic
Name
2+7 =