JavaScriptWeb Storage


Syntax

  • localStorage.setItem(name, value);

  • localStorage.getItem(name);

  • localStorage.name = value;

  • localStorage.name;

  • localStorage.clear()

  • localStorage.removeItem(name);

Parameters

ParameterDescription
nameThe key/name of the item
valueThe value of the item

Remarks