I have the following exercise question that I'm having a hard time wrapping my head around:
So far I've started the code off as such:
var form = document.getElementById("form1");
var item = form.elements["name"].value;
var cost = form.elements["price"].value;
//what should I do next?
//remove item code here
Item Name: <input name="name" type="text">
Item Cost: <input name="price" type="text">
I have the basic structure of how I want my page to look. I know that I will have to create two functions that will handle the add item and remove item criteria in the question. However, I'm sort of lost at the point where I have to save the user's input. I know that I have to use web storage and possibly an array? How should this be coded?
Would appreciate any insight. Thanks in advance.