Code to go logo
Created using Figma
Use Cases
Contribute
How to add item to sessionstorage in JavaScript
Storage
By Jad Joubran ·
Last updated Dec 21, 2017
const name = "John"; sessionStorage.setItem("name", name);
Dec 21, 2017
1
Jad Joubran
See answer
1
Jad Joubran
Window.sessionStorage
on MDN
Learn JavaScript step by step
Related use cases
How to get item from sessionstorage in JavaScript