Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

remove item from localstorage

localStorage.removeItem('key');
Comment

remove array item from localStorage

// 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));
Comment

PREVIOUS NEXT
Code Example
Javascript :: props vue 3 
Javascript :: how to append the dropdown values by jquery each function 
Javascript :: javascript iterate over divs 
Javascript :: generate random date 
Javascript :: how to trap js errors window.onerror 
Javascript :: javascript object tostring 
Javascript :: unique values in array javascript 
Javascript :: check if new user in firebase react 
Javascript :: remove duplicate object from array javascript 
Javascript :: string contains substring javascript 
Javascript :: typescript how to mode json files when compile 
Javascript :: pxijs text 
Javascript :: word to char array javascript 
Javascript :: chartjs min 
Javascript :: discord.js ban command 
Javascript :: react native svg onpress 
Javascript :: ajax form picture upload 
Javascript :: stylelint init 
Javascript :: Auto submit a form 
Javascript :: Angular version chrome console 
Javascript :: how to create a server in node js 
Javascript :: how to store an entire object in cookies javascript 
Javascript :: how to uncheck a radio button 
Javascript :: get file extension node 
Javascript :: javascript check if dom element 
Javascript :: how to declare a variable inside a class in javascript 
Javascript :: passing state in link react 
Javascript :: ternary operator angular template 
Javascript :: extract value from array of objects javascript 
Javascript :: how to instance in a node with code godot 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =