get items from local storage function code example
Example 1: how to get all items in localstorage
function allStorage() {
var values = [],
keys = Object.keys(localStorage),
i = keys.length;
while ( i-- ) {
values.push( localStorage.getItem(keys[i]) );
}
return values;
}
Example 2: javascript get local storage
var Item = localStorage.getItem('youritem');
Example 3: get localstorage value
localStorage.getItem('bgcolor');