You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
// a sample 2-D array
|
|
var a = [[1, 2, 1, 24], [8, 11, 9, 4], [7, 0, 7, 27], [7, 4, 28, 14], [3, 10, 26, 7]];
|
|
|
|
for (var i in a)
|
|
{
|
|
console.log("row " + i);
|
|
for (var j in a[i])
|
|
{
|
|
console.log(" " + a[i][j]);
|
|
}
|
|
} |