title: How do I store an array in localStorage?
body: <p>If I didn't need localStorage, my code would look like this:</p>
  
  <pre><code>var names=new Array(); 
  names[0]=prompt("New member name?");
  </code></pre>
  
  <p>This works. However, I need to store this variable in localStorage and it's proving quite stubborn. I've tried:</p>
  
  <pre><code>var localStorage[names] = new Array();
  localStorage.names[0] = prompt("New member name?");
  </code></pre>
  
  <p>Where am I going wrong?</p>