1// our array
2var movies = ["Reservoir Dogs", "Pulp Fiction", "Jackie Brown",
3"Kill Bill", "Death Proof", "Inglourious Basterds"];
4
5// storing our array as a string
6localStorage.setItem("quentinTarantino", JSON.stringify(movies));
7
8// retrieving our data and converting it back into an array
9var retrievedData = localStorage.getItem("quentinTarantino");
10var movies2 = JSON.parse(retrievedData);
11
12//making sure it still is an array
13alert(movies2.length);