Answers for "js local storage remove item"

7

remove localstorage

localStorage.removeItem("key");
Posted by: Guest on October-18-2020
4

get localstorage

function get(){
    var getJson = localStorage.getItem('key')
    if(getJson){
        arrayName = JSON.parse(getJson)
    }
}
Posted by: Guest on October-07-2020
1

remove item from localstorage

localStorage.removeItem('key');
Posted by: Guest on September-22-2021
0

how to setItem and getItem in javascript in localStorage

function set(){
    var sendJSON = JSON.stringify(allMovie);
    localStorage.setItem('allMovie',sendJSON)
}

function get(){
    var getJSON = localStorage.getItem('allMovie');
    if (getJSON){
        allMovie = JSON.parse(getJSON)
    }

}
Posted by: Guest on August-10-2020
0

remove local storage item

localStorage.removeItem(key);
Posted by: Guest on April-27-2020

Code answers related to "js local storage remove item"

Code answers related to "Javascript"

Browse Popular Code Answers by Language