nested array in js code example
Example 1: javascript nested array
//2-dimensional(nested) array
var array = [[0,2,3,7,2,2,1],[1,2,6,3,7,0,3]]
Example 2: javascript multidimensional array
var items = [
[1, 2],
[3, 4],
[5, 6]
];
console.log(items[0][0]); // 1
console.log(items[0][1]); // 2
console.log(items[1][0]); // 3
console.log(items[1][1]); // 4
console.log(items);