Local Storage API, Storing and Retreiving Simple Data, Arrays, Associative Arrays, and Objects
Local storage can store and load simple data.
Type a word and press store to store and load to display the stored word.
Enter a first name :
Enter a last name :
Enter a number:
Simple Data
After pressing store data and load data, This will display the most recent first name in local storage.
Arrays
After pressing store data and load data, This will display a list of all first names stored in local storage. This can be reset by pressing the Reset Data button.
Associative Arrays
After pressing store data and load data, If a first and last name was entered, This will display the first and last name together. The first name acts as a key and the last name acts as a value in an associative array. This will reset if you press Reset Data.
Object
After Pressing store data and load data, If all fields are filled, this will display a first name, last name and number. These items are stored in an object. This can be reset by pressing the Reset Data button.