how to get value of a object in localstorage code example Example: get localstorage value localStorage.getItem('bgcolor');