Answers for "adding to array in local storagw"

5

localstorage save array

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

//...
var storedNames = JSON.parse(localStorage.getItem("names"));
Posted by: Guest on September-01-2020

Code answers related to "adding to array in local storagw"

Code answers related to "Javascript"

Browse Popular Code Answers by Language