1var i;
2
3console.log("local storage");
4for (i = 0; i < localStorage.length; i++) {
5 console.log(localStorage.key(i) + "=[" + localStorage.getItem(localStorage.key(i)) + "]");
6}
7
8console.log("session storage");
9for (i = 0; i < sessionStorage.length; i++) {
10 console.log(sessionStorage.key(i) + "=[" + sessionStorage.getItem(sessionStorage.key(i)) + "]");
11}
12