Answers for "javascript store json in cookie"

28

javascript store object in local storage

var person = { "name": "billy", "age": 23};

localStorage.setItem('person', JSON.stringify(person)); //stringify object and store
var retrievedPerson = JSON.parse(localStorage.getItem('person')); //retrieve the object
Posted by: Guest on July-22-2019
0

javascript variable store in php

<script>
var a="Hello";
</script>
Posted by: Guest on September-13-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language