title: Two dimensional array in Javascript, [num][value1, value2, value3]
body: <p>I'm trying to create a 2D array in JS that I can return from my method.  I basically want to do something like this:</p>
  
  <pre><code>var msg[][4] = [][entryID, entryName, entryURL, entryDesc];
  for (var i = 0, len = bookmarks.length; i &lt; len; i++) {
     var id = bookmarks[i].getElementsByTagName('id')[0].firstChild.nodeValue;
     var name = bookmarks[i].getElementsByTagName('name')[0].firstChild.nodeValue;
     var url = bookmarks[i].getElementsByTagName('url')[0].firstChild.nodeValue;
     var desc = bookmarks[i].getElementsByTagName('desc')[0].firstChild.nodeValue;
      msg[i][entryID] = id;
      msg[i][entryName] = name;
      msg[i][entryURL] = entryURL;
      msg[i][entryDesc] = entryDesc;
  }    
  </code></pre>
  
  <p>The first line msg[][4] throws an error.  I'm not sure if or how I can do something like that.  Thanks.</p>