How can I create a two dimensional array in JavaScript?

I have been reading online and some places say it isn’t possible, some say it is and then give an example and others refute the example, etc.

  1. How do I declare a 2 dimensional array in JavaScript? (assuming it’s possible)

  2. How would I access its members? (myArray[0][1] or myArray[0,1]?)

5
54

Leave a Comment