how to save to local storage using javascript code example
Example 1: copy localstorage javascript
var data = JSON.parse(/*previously copied stringified JSON from clipboard*/);
Object.keys(data).forEach(function (k) {
localStorage.setItem(k, data[k]);
});
Example 2: set localstorage
function set(){
var sendJson = JSON.stringify(arrayName);
localStorage.setItem('key',sendJson)
}