remove element from localstorage javascript code example Example: remove localstorage localStorage.removeItem("key");