javascript-local-storage Flashcards
1
Q
How to you store data in localStorage?
A
setItem()
2
Q
How to you retrieve data from localStorage?
A
getItem()
3
Q
What data type can localStorage save in the browser?
A
string values
4
Q
When does the ‘beforeunload’ event fire on the window object?
A
fires when the window, the document and its resources are about to be unloaded. Doc still visible and still cancelable at this point.