javascript clear localstorage
window.localStorage.clear(); //clear all localstorage
window.localStorage.removeItem("my_item_key"); //remove one item
javascript clear localstorage
window.localStorage.clear(); //clear all localstorage
window.localStorage.removeItem("my_item_key"); //remove one item
how to get variable in local storage in javascript
localStorage.getItem('id');
localstorage.getitem()
//The following snippet accesses the current domain's local Storage object
//and adds a data item to it using Storage.setItem().
localStorage.setItem('myCat', 'Tom');
//The syntax for reading the localStorage item is as follows:
const cat = localStorage.getItem('myCat');
//The syntax for removing the localStorage item is as follows:
localStorage.removeItem('myCat');
//The syntax for removing all the localStorage items is as follows:
localStorage.clear();
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us