Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add array to localstorage

var names = [];
names[0] = prompt("New member name?");
localStorage.setItem("names", JSON.stringify(names));

//...
var storedNames = JSON.parse(localStorage.getItem("names"));
 
PREVIOUS NEXT
Tagged: #add #array #localstorage
ADD COMMENT
Topic
Name
7+6 =