title: Iterate over a JavaScript array without using nested for-loops
body: <p>I've been trying to iterate over a multidimensional array in JavaScript, and print each element in the array. Is there any way to print each element in a multidimensional array without using nested for-loops?</p>
  
  <p><a href="http://jsfiddle.net/mKsDW/" rel="nofollow">http://jsfiddle.net/mKsDW/</a></p>
  
  <pre><code>var arr = [[1, 5],[7, 4]];
  for(var i in arr){
      alert(i); //this displays "0", then displays "1",
      //instead of printing each element in the array
      //how can I make it print each element in each 2D array instead,
      //without using nested for-loops for each dimension of the array?
  }
  </code></pre>