javascrtipt which method store data in web storage code example
Example 1: local storage
function setItem(name, value) {
localStorage.setItem(name, value);
}
function getItem(name) {
localStorage.getItem(name);
}
function deletItem(name) {
localStorage.removeItem(name);
}
function clearStorage() {
localStorage.clear();
}
Example 2: localstorage
var cat = localStorage.getItem('myCat');
Example 3: localstorage
localStorage.removeItem('myCat');