title: Trying to join a two-dimensional array in Javascript
body: <p>I'm trying to convert a two-dimensional array to a string in order to store it in the localStorage array. However, there is something wrong with this code I cannot identify:</p>
  
  <pre><code>for(x in array) {
      if(array[x] instanceof Array) {
          array[x] = array[x].join("`");
      }
  }
  var string = array.join("@");
  localStorage[key] = string;
  </code></pre>
  
  <p>Does anyone have an idea what I'm doing wrong?</p>
  
  <p>As for what's wrong, by multidimensional array I mean array[0][1] etc.
  When input into localStorage, all the 'string' is reduced to is @, implying on the other side of the @ there are still arrays.</p>