+ 1

Can foreach navigate into a Local storage on JS items?

Global Values

9th Nov 2018, 7:01 PM
EL MAHDI BENBRAHIM
EL MAHDI BENBRAHIM - avatar
2 ответов
+ 1
thanks
10th Nov 2018, 5:52 PM
EL MAHDI BENBRAHIM
EL MAHDI BENBRAHIM - avatar
+ 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
10th Nov 2018, 12:33 AM
Calviղ
Calviղ - avatar