Answers for "how to get an item from local storage and save it in a variable"

0

how to get variable in local storage in javascript

localStorage.getItem('id');
Posted by: Guest on February-28-2020
2

javascript save data to local storage

// Store
localStorage.lastname = "Smith";
// Retrieve
document.getElementById("result").innerHTML = localStorage.lastname;
// Remove
localStorage.removeItem("lastname");
Posted by: Guest on December-11-2020

Code answers related to "how to get an item from local storage and save it in a variable"

Code answers related to "Javascript"

Browse Popular Code Answers by Language