setItem localS code example
Example 1: set localstorage
function set(){
var sendJson = JSON.stringify(arrayName);
localStorage.setItem('key',sendJson)
}
Example 2: set localstorage value
localStorage.setItem("mytime", Date.now());
function set(){
var sendJson = JSON.stringify(arrayName);
localStorage.setItem('key',sendJson)
}
localStorage.setItem("mytime", Date.now());