remove item in localstorage js code example Example: localstorage clear item localStorage.removeItem(key);