/ Published in: JavaScript
The `localStorage.key` method is a great way to loop over localStorage items.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var i, ls = localStorage, l = ls.length, key; for (var i = 0; i < l; i++) { key = ls.key(i); console.log(key + ": " + ls.getItem(key)); }