Issue
Is there any way to clear a specific localStorage in html using javascript:
localStorage.setItem("one");
localStorage.setItem("two");
//How to clear only "one"
Solution
You can remove an item from the localStorage with the removeItem function:
localStorage.removeItem(key);
So in your case:
localStorage.removeItem("one");
Answered By - dns_nx
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.