localstoreage set item code example
Example 1: localstorage set item
localStorage.getItem('data')
localStorage.setItem('token', 'token here');
localStorage.removeItem('token');
Example 2: localstorage setitem
function populateStorage() {
localStorage.setItem('bgcolor', 'red');
localStorage.setItem('font', 'Helvetica');
localStorage.setItem('image', 'myCat.png');
}