Зацикливаться на всех ключах в местном хранении

let nextValue;
for (let i = 0; i < localStorage.length; i++){
    nextValue = localStorage.getItem(localStorage.key(i));
    //Do something with nextValue..
    //...
}
Zany Zebra