How we can check the values in session storage? I mean, if i need to check what are the values stored in Session storage, how we can check that?
            Asked
            
        
        
            Active
            
        
            Viewed 1,470 times
        
    0
            
            
        - 
                    1do you know the names of keys for the values? – Chandra Kanth May 15 '20 at 07:56
- 
                    2Does this answer your question? [Looping through localStorage in HTML5 and JavaScript](https://stackoverflow.com/questions/3138564/looping-through-localstorage-in-html5-and-javascript) – Roy M J May 15 '20 at 08:00
- 
                    when we don't know the name of key. i want to get all the values in session storage – Ajish Kumar May 15 '20 at 09:33
1 Answers
1
            set the key and value like this
sessionStorage.setItem("user-id", userId);
and extract it like this using key
userId = sessionStorage.getItem("user-id")
 
    
    
        Shlok Nangia
        
- 2,355
- 3
- 16
- 24
