Local Storage Flashcards
1
Q
How do you store data in localStorage?
A
the setItem() function
2
Q
How do you retrieve data from localStorage?
A
using the getItem() method
3
Q
What data type can localStorage save in the browser?
A
JSON strings
4
Q
When does the ‘beforeunload’ event fire on the window object?
A
when a document is about to be unloaded.