localStorage setItem return code example
Example 1: localstorage set item
localStorage.getItem('data')
localStorage.setItem('token', 'token here');
localStorage.removeItem('token');
Example 2: set localstorage value
localStorage.setItem("mytime", Date.now());