window.localstorage in javascript code example
Example 1: javascript set localstorage
localStorage.setItem('myCat', 'Link');
let aValue = localStorage.getItem('myCat');
Example 2: local storage javascript
localStorage.setItem('user_name', 'Rohit');
var retrievedUsername = localStorage.getItem('user_name');
Example 3: localstorage javascript
localStorage.setItem(key, val);
var val = localStorage.getItem(key);
localStorage.removeItem(key);
localStorage.clear();
Example 4: my local storage
function set(){
var sendJson = JSON.stringify(allwish);
localStorage.setItem("wishKay",sendJson);
}