There is no concept of multi-dimensional array in JavaScript.
But it can be simulated.
1 dimension
// When the length of an array cannot be determined, declare an array name first and assign values one by one.
VaR tarray = new array ();
Tarray [0] = 'a ';
Tarray [1] = '2 ';
// 2 know the exact length and create an array
VaR tarray = new array (10 );
// 3 create an array and assign a value at the same time
VaR tarray = new array ('A', '2', '3', '4', '5', '6', '7', '8 ', '9', '10', 'J', 'Q', 'k ');
VaR tarray = ['A', '2', '3', '4', '5', '6', '7', '8', '9 ', '10', 'J', 'Q', 'K'];
// The following multi-dimensional arrays are also similar
2-Dimension
Method 1
VaR tarrar = new array ();
Tarrar [0] = new array ();
Tarrar [0] [0] = "AA ";
Tarrar [0] [1] = "BB ";
Tarrar [1] = new array ();
Tarrar [1] [0] = "cc ";
Tarrar [1] [1] = "DD ";
Method 2
VaR AA = new array (['1', '2'], ['3', '4'], ['5', '6']);
Dimension 3
Method 1
VaR tarray = new array ();
Tarray [0] = new array ();
Tarray [0] [0] = new array ();
Tarray [0] [1] = new array ();
Tarray [0] [0] [0] = "111 ";
Tarray [0] [0] [1] = "222 ";
Tarray [0] [1] [0] = "333 ";
Tarray [0] [1] [1] = "444 ";
Method 2
VaR AA = new array ([['000', '001', '002'], ['010 ', '011', '012'], ['020 ', '021 ', '022'], [['123456', '1234568', '1234568'], ['1234568', '1234568'], ['123', '123', '123']);
Note the [] nested position in the braces. To make it clearer. Modified the format.
VaR BB = new array (
[
['000', '001', '002'],
['012', '011', '012'],
['020', '021 ', '022']
],
[
['20160301', '20160301', '20160301'],
['20160301', '20160301', '20160301'],
['20160301', '20160301', '20160301']
]
);