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));

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

method for retrieving a value from the window object’s local storage

A

window.localStorage.getItem(keyName)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Method that turns stringifed JSON code back into normal JSON code?

A

JSON.parse(itemToParse)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly