localStorage.setItem("key", "value")
localStorage.key=value
localStorage.getItem("key")
localStorage.removeItem("key")
delete localStorage.key
localStorage.clear()
localStorage.key(index)
localStorage.length
JSON.stringify(object)
=> Converts objects to JSON stringJSON.parse(string)
=> Converts string (must be a valid JSON) to objectsdocument.cookie
=> Returns cookies delimited by semicolondocument.cookie="key=value"
=> Adds to the cookies instead of replacing as key value pairdocument.cookie="key=value;path=/a;expires=date"
=> Adds with optionsencodeURIComponent(value)
=> Encode the value as a stringdecodeURIComponent(value)
=> Decode the value as a string window.onstorage = (e) => {
console.log(e);
}