Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

localstorage syntax

localStorage.setItem('person', JSON.stringify(person)); //stringify object and store
var retrievedPerson = JSON.parse(localStorage.getItem('person')); //retrieve the object
Source by blog.logrocket.com #
 
PREVIOUS NEXT
Tagged: #localstorage #syntax
ADD COMMENT
Topic
Name
3+8 =