local storage is the one type of session which will be there in every browser to store websites data in key value pair and it can store only string type of data.
@@hexadecimalhexadecimal5241 you will need that when you want do display the object in string, I think he is just simply showing how to save object into local storage
I dont know if you still need the explanation, but it prevents the default functions of certain items. For example, you can prevent a page reloading if you press the submit button in a form by inserting event.preventDefault ();
it wont let me edit my comment, but you can create a function in javascript, get the element you want (in this case the submit button) by using DOM (getElementById) and then preventing the default. Just insert the script on top of the HTML page in the head, or at the bottom of the html page (people have different preferences) and make sure the script only starts working once the HTML page is fully loaded.
it will prevent the webpage to reload which in default be reloaded in seconds to avoid loosing of data we make our page to be loaded till we submit the form.