Answers for "what is localstorage"

5

javascript clear localstorage

window.localStorage.clear(); //clear all localstorage
window.localStorage.removeItem("my_item_key"); //remove one item
Posted by: Guest on July-31-2019
5

save to local storage

localStorage.setItem('myCat', 'Tom');

var cat = localStorage.getItem('myCat');

localStorage.removeItem('myCat');

// Clear all items
localStorage.clear();
Posted by: Guest on April-27-2020
42

local storage 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
1

javascript localstorage

var KeyName = window.localStorage.key(index);
Posted by: Guest on May-22-2020
0

save to local storage

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

Code answers related to "what is localstorage"

Code answers related to "Javascript"

Browse Popular Code Answers by Language