The example in the links below shows a script that displays the results of rolling a die n times. It retains (in memory) and can display the results of all rolls. The two links below are the html and js files for this example.
http://kengeddes.com/cs80/examples/diceSaveResults.html
http://kengeddes.com/cs80/examples/diceSaveResults.js
Add HTML and JavaScript code to save all the results to Web Storage. Your code shall meet the following requirements:
There will be two additional buttons labeled Save and Retrieve. When Save is clicked, the contents of the allResults variable (an array) will be saved to local storage (as a string). Note: For a tutorial on this new feature of HTML5, see (http://www.w3schools.com/html/html5_webstorage.asp).
When Retrieve is clicked, the allResults variable will be set to the value it had when the Save button was last clicked. Hint: Retrieve the data saved to local storage, re-create the array, and assign it to the allResults variable.