The deleteKey() method of the localStorage interface removes a key from the browser storage
deleteKey()
Example
window.localStorage.deleteKey("session")
Last updated 2 months ago