Answers for "javascript delete items in localstorage"

7

remove localstorage

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

localstorage.removeitem()

// Don't use removeItem() that as the name says removes the whole item from localStorage. Just do another setItem() to overwrite the old data.
questions.splice(index, 1);
localStorage.setItem('questions',JSON.stringify(questions));
Posted by: Guest on March-10-2020

Code answers related to "javascript delete items in localstorage"

Code answers related to "Javascript"

Browse Popular Code Answers by Language