getItem
Retrieves the data associated with the specified key.
Declaration
String getItem(
in String key
);getter DOMString? getItem(
DOMString key
);Parameters
- key:
A
Stringobject containing the key being searched for.
Return Value
A String object containing the data associated with the passed key.
Discussion
The getItem function retrieves the data associated with the given key. If the key does not exist, the function returns null.