delete local storage item code example
Example 1: remove localstorage
localStorage.removeItem("key");
Example 2: localstorage clear item
localStorage.removeItem(key);
Example 3: javascript localStorage clear items
localStorage.clear();//this clears the localStorage completely
Example 4: javascript localstorage
var KeyName = window.localStorage.key(index);