Answers for "list of items in local storage javascript"

25

local storage javascript array

//storing array in localStorage
var colors = ["red","blue","green"];
localStorage.setItem("my_colors", JSON.stringify(colors)); //store colors
var storedColors = JSON.parse(localStorage.getItem("my_colors")); //get them back
Posted by: Guest on July-31-2019
5

get all local storage

const items = { ...localStorage };
Posted by: Guest on June-15-2021

Code answers related to "list of items in local storage javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language