how to load local storage javascript code example
Example 1: get localstorage
function get(){
var getJson = localStorage.getItem('key')
if(getJson){
arrayName = JSON.parse(getJson)
}
}
Example 2: local storage javascript
localStorage.setItem('user_name', 'Rohit'); //store a key/value
var retrievedUsername = localStorage.getItem('user_name'); //retrieve the key