title: Enhanced for loop in 2D Array - JavaScript
body: <p>I created the following 2D array in Javascript</p>
  
  <pre><code>// Create basic linear array
  var ImgArray = new Array(4);
  
  // Do the 2D array for each or the linear array slots
  for (i=0; i &lt; 4 ; i++) {
      ImgArray[i] = new Array(4)
  }
  </code></pre>
  
  <p>Now i want to iterate through it using 2 ' enhanced for loops'. But am stuck on how to use the loop as there is only <code>ImgArray</code> stated a such. For example;</p>
  
  <pre><code>// Load the images
  for(var i in ImgArray) { 
      for( ??? ) {           // How would i do this? What do i state as an array?
            ///...
      }
      document.write("&lt;br&gt;");
  }
  </code></pre>
  
  <p>Any advise well appreciated </p>