title: How to create empty 2d array in javascript?
body: <p>How do I  create an empty 2D array in Javascript (without knowing how many rows or columns there will be in the new array)?</p>
  
  <p>If it's a simple array <code>var newArray = new Array();</code> I can assign as many elements as I want. But what about a 2D array? Can I create one without specifying the numbers of rows and columns? and how do I access the elements afterwards (<code>myArray[0][1]</code> or <code>myArray[0,1]</code>)?</p>