js local storage Flashcards
1
Q
How to you store data in localStorage?
A
localStorage.setItem()
2
Q
How to you retrieve data from localStorage?
A
localStorage.getItem()
3
Q
What data type can localStorage save in the browser?
A
UTF-16 DOMString
4
Q
When does the ‘beforeunload’ event fire on the window object?
A
after trying to reload but before actually reloading