javascript-local-storage Flashcards

1
Q

How to you store data in localStorage?

A

Using setItem( ) method.

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

How to you retrieve data from localStorage?

A

Using getItem( ) method.

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

What data type can localStorage save in the browser?

A

String values.

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

When does the ‘beforeunload’ event fire on the window object?

A

When the page is about to be unloaded (reloaded, exited).

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