how remove button works in html to remove localstorage using javascript code example Example: remove localstorage localStorage.removeItem("key");