localstorage setitme javascript code example
Example 1: localstorage setitem
function populateStorage() {
localStorage.setItem('bgcolor', 'red');
localStorage.setItem('font', 'Helvetica');
localStorage.setItem('image', 'myCat.png');
}
Example 2: set localstorage
function set(){
var sendJson = JSON.stringify(arrayName);
localStorage.setItem('key',sendJson)
}