how to declare 3d array in javascript 1

how to declare 3d array in javascript

var myArray = [[[]]];

Here is what the above code is Doing:
1. We create a variable called myArray and set it equal to an empty array.
2. We then use the push() method to add a new array to myArray.
3. We then use the push() method again to add a new array to the last array that we just added to myArray.
4. We then use the push() method a third time to add a new array to the last array that we just added to myArray.

Similar Posts