Looping através do JavaScript de armazenamento local

for (const [key, value] of Object.entries(localStorage)) {
	console.log(`${key}: ${value}`);
}
Undefined