leather converse retrieving last key in javascr

retrieving last key in javascript localstorage

I am doing a uni assignment so please excuse the coplete lack of knowledge here. I have been tasked with creating a web based app for a “client” that requires me to open an invoice after they have completed all the details, so far I have the form working fine, i can save to localstorage without an issue and can even retrieve the information in the format that I want.

The issue is that if i have multi leather converse ple “ leather converse orders’ than i can only retrieve the first string saved to localstorage and i cannot figure out how to make it display the newest/last one.

The key is an almost randomly generated number derived from the date as we had to assum leather converse e a large quantity of orders. I have attached the code below so if anyone can help i would appreciat leather converse e it. Also I cannot use Jquery or JSON or anything like that. We have been told we are not able to use these. Also i cannot use a server (php etc).