local storage in the browser code example
Example 1: localstorage javascript
localStorage.setItem(key, val);
var val = localStorage.getItem(key);
localStorage.removeItem(key);
localStorage.clear();
Example 2: setlocalstorage
localStorage.setItem('data', JSON.stringify(arryName));