how to get value of a variable stored in localstorage code example Example: how to get variable in local storage in javascript localStorage.getItem('id');