JavaScript Storage getItem() Method
JavaScript Storage getItem() Method
The getItem() method is used for returning the value of 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.getItem(keyname) OR sessionStorage.getItem(keyname)
Further Explanation:-
Parameter | Description |
---|---|
keyname | Required. A String specifying the name of the key we want to get the value of |