lnot a valid way to store value in local sttorage code example
Example 1: localstorage
var cat = localStorage.getItem('myCat');
Example 2: localstorage
localStorage.setItem('myCat', 'Tom');
var cat = localStorage.getItem('myCat');
localStorage.setItem('myCat', 'Tom');