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