delete from local storage js code example Example: remove localstorage localStorage.removeItem("key");