So I have this following code set up to create an li element when someone inputs something into a box. I also want the li element to contain a unique ID which will begin with list-Item0 and go to list-Item1, etc with every li created when someone types into the box and adds the item.
Any idea how I would go about doing this? I don't know what JQuery is as I am a complete beginner so am looking for something extremely basic which I can implement in this code.
Here's what I have so far:
function addItemFunction() {
document.getElementById("itemList").innerHTML=document.getElementById("itemList").innerHTML + '<li>' + addNewBox.value + '</li>';
}