sessionStorage into array and print all values in the array
<p>I am currently trying to store an array into <code>sessionStorage</code> and then retrieve the data from <code>sessionStorage</code>. Then, store the <code>sessionStorage</code> data back into an array.</p>

<pre><code>var testArray = ["Shirt", "Bottom", "Shoes"];
window.sessionStorage.setItem("items", JSON.stringify(testArray));
var storedArray = JSON.parse('[' + sessionStorage.getItem("items") + ']');
var i;
for (i = 0; i &lt; storedArray.length; i++) {
     alert(storedArray[i]);
}
</code></pre>

<p>Am I doing anything wrong here?</p>