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 backvar names = [];
names[0] = prompt("New member name?");
localStorage.setItem("names", JSON.stringify(names));
//...
var storedNames = JSON.parse(localStorage.getItem("names"));
Also in JavaScript:
- javascript substring after character
- textinput onpress react native
- kill all node server mac terminal
- submit ajax form validation jquery
- how to draw a horizontal line in javascript
- javascript gcd
- how to get the year in javascript
- javascript uppercase first letter of each word
- javascript all type of data
- javascript calculate age
- WHAT IS NODE IN DOM
- compare two array javascript
- get selected option value jquery
- nodejs include json file
- find element in array underscore js
- capitalize first letter of each word javascript
- testing objects for properties javascript
- jquery get textarea value
- "when.promise" async await
- js percorrer objeto
- how to return multiple values from a function javascript
- datatables get all rows
- random array javascript
- javascript on submit