Answers for "using localStorage api"

5

javascript localstorage

localStorage.setItem("user_name", "Bob");

document.body.addEventListener("click", function(){
  alert(localStorage.getItem("user_name"))
});
Posted by: Guest on May-14-2020
0

save to local storage

var cat = localStorage.getItem('myCat');
Posted by: Guest on April-27-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language