set local storage to a variable code example
Example 1: how to add variable to local storage in javascript
localStorage.setItem('key', 'value')
Example 2: how to get variable in local storage in javascript
localStorage.getItem('id');
localStorage.setItem('key', 'value')
localStorage.getItem('id');