Develop Websites
Build Apps
Go Headless
APIs and SDKs
/
setItem( )
Stores an item in local or memory storage.
Method Declaration
Copy
Method Parameters
key
string
Required
The key of item to set.
value
union
Required
The value of the item to set.
Show union Type Options
Example shown:
Store an item in local storage
JavaScript
Did this help?
Yes
No