Hi, I am new to JS from Python. I am trying to create a To Do List in JS, and I am trying to loop over an array that contains the added items. I want each item in the array to appear on a new line in the web app. The best I can get is for the items to be displayed like this
item1,item2,item3
I want them to appear as:
item1
item2
item3
Here is the function I am using for the loop
item1,item2,item3
I want them to appear as:
item1
item2
item3
Here is the function I am using for the loop
Code:
function displayListItems() {
for (const item of toDoList) {
h3textItems.innerText = toDoList;
}
}