title: For loop in multidimensional javascript array
body: <p>Since now, I'm using this loop to iterate over the elements of an array, which works fine even if I put objects with various properties inside of it.</p>
  <pre><code>var cubes[];
  
  for (i in cubes){
       cubes[i].dimension
       cubes[i].position_x
       ecc..
  }
  </code></pre>
  <p>Now, let's suppose cubes[] is declared this way</p>
  <pre><code>var cubes[][];
  </code></pre>
  <p>Can I do this in JavaScript? How can I then automatically iterate in</p>
  <pre><code>cubes[0][0]
  cubes[0][1]
  cubes[0][2]
  cubes[1][0]
  cubes[1][1]
  cubes[1][2]
  cubes[2][0]
  ecc...
  </code></pre>
  <p>As a workaround, I can just declare:</p>
  <pre><code>var cubes[];
  var cubes1[];
  </code></pre>
  <p>and work separately with the two arrays. Is this a better solution?</p>