Answers for "what does locals do in javascript"

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
3

localstorage js

// Set
localStorage.setItem('monChat', 'Tom');

// Get
localStorage.getItem('myCat');

// Remove
localStorage.removeItem('myCat');
Posted by: Guest on July-08-2020

Code answers related to "what does locals do in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language