store local storage to sessionstaorage code example
Example 1: localstorage
localStorage.setItem('myCat', 'Tom');
Example 2: localstorage
localStorage.removeItem('myCat');
localStorage.setItem('myCat', 'Tom');
localStorage.removeItem('myCat');