9 Syntax) Storage + Persistence Flashcards
1
Q
method for adding a key value pair to the window object’s local storage
A
.setItem(keyName, JSON.stringify(objectToSave));
2
Q
method for retrieving a value from the window object’s local storage
A
window.localStorage.getItem(keyName)
3
Q
Method that turns stringifed JSON code back into normal JSON code?
A
JSON.parse(itemToParse)