Answers for "is local storage a property from window"

42

localstorage javascript

localStorage.setItem('user_name', 'Rohit'); //store a key/value
var retrievedUsername = localStorage.getItem('user_name'); //retrieve the key
Posted by: Guest on October-23-2019
0

copy localstorage javascript

var data = JSON.parse(/*previously copied stringified JSON from clipboard*/);
Object.keys(data).forEach(function (k) {
  localStorage.setItem(k, data[k]);
});
Posted by: Guest on September-15-2020

Code answers related to "is local storage a property from window"

Code answers related to "Javascript"

Browse Popular Code Answers by Language