JavaScript Storage clear() Method
JavaScript Storage clear() Method
The clear() method is used for removing all the Storage Object items for the current domain. 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.clear() OR sessionStorage.clear()