Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

local storage javascript object

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
Comment

PREVIOUS NEXT
Code Example
Javascript :: change value krajee star rating using jquery 
Javascript :: how to check if user is typing discord js 
Javascript :: SyntaxError: Cannot use import statement outside a module node js 
Javascript :: filter number in string javascript 
Javascript :: add readonly attribute jquery 
Javascript :: capture enter button react input 
Javascript :: show console chrome mac 
Javascript :: npx nestjs 
Javascript :: javascript find diff in nested objects node js 
Javascript :: htmlparser2 extract text from html 
Javascript :: Sailsdock 
Javascript :: promise settimeout 
Javascript :: how to zip two arrays in javascript 
Javascript :: set focus javascript 
Javascript :: eslint no-param-reassign 
Javascript :: javascript change table row color based on value 
Javascript :: how to prevent the form from getting automatically submitted javascript 
Javascript :: angular generate component 
Javascript :: javascript body element 
Javascript :: save json file python 
Javascript :: check if element is array javascript 
Javascript :: clear input field data on button click 
Javascript :: generate random otp in node js 
Javascript :: diffrence b/w render and reload 
Javascript :: node:internal/crypto/hash:67 this[kHandle] = new _Hash(algorithm, xofLen); 
Javascript :: react jsx style with calc 
Javascript :: react map 
Javascript :: why my bootstrap classes is not working on onclick event in react 
Javascript :: regex not ending with 
Javascript :: rn push notification No task registered for key ReactNativeFirebaseMessagingHeadlessTask 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =