How to add item to sessionstorage in JavaScript

Storage
Last updated Dec 21, 2017
const name = "John";

sessionStorage.setItem("name", name);