I want to show all of the keys and storage written before. My code is below. I created a function (allStorage) but it doesn\'t work. How can I do this?
The easiest way in ES2015+ is:
const items = { ...localStorage };