+ 1
Can foreach navigate into a Local storage on JS items?
Global Values
2 ответов
+ 1
thanks
+ 4
// try this
var allItems = [];
localStorage.forEach ( (s,i) => allItems.push(
{ this.key(i) : this.getItem( this.key(i) ) }
) ):
console.log(JSON.stringify(allItems)); // to list allitems on console log