Source Code:
(back to article)
var myArray = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ]; for (var i = 0; i < myArray.length; i++) { for (var j = 0; j < myArray[i].length; j++) { console.log(myArray[i][j]); // prints each element in the array } }
Result:
Report an issue