Answers for "save in storage js"

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
2

how to add variable to local storage in javascript

localStorage.setItem('key', 'value')
Posted by: Guest on February-28-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language