Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

localstorage setitem javascript

let fruits = [
	{ name: 'apple', color: 'red', number: 1 },
  	{ name: 'orange', color: 'orange', number: 2 }
]
localStorage.setItem("saved_fruits", JSON.parse(JSON.stringify(fruits)));
 
PREVIOUS NEXT
Tagged: #localstorage #setitem #javascript
ADD COMMENT
Topic
Name
5+2 =