localStorage, sessionStorage are JavaScript Objects and you can treat them as such.
Instead of using Storage Methods like .getItem(), .setItem(), etc… here's a simpler alternative:
// Set
localStorage.greet = "Hi!"; // Same as: window.localStorage.setItem("greet", "Hi!&qu...