JavaScript Storage removeItem() Method
JavaScript Storage removeItem() Method
The removeItem() method is used for removing the specified Storage Object item. It is a very important method of the Storage Object. The Storage Object is either a localStorage object or a sessionStorrage object.
Syntax:-
Its syntax is:- localStorage.removeItem(keyname) OR sessionStorage.removeItem(keyname)
Further Explanation:-
Parameter | Description |
---|---|
keyname | Required. A String specifying the name of the key we want to delete. |