I'm trying to make a list from info the user enters.
var todoArray = new Array();
document.getElementById("addButton").onclick = function(){
var temp = document.getElementById("inputBox").value;
var appendTemp = "<li><input type=\"checkbox\">" + temp + "</li>";
todoArray.push(appendTemp);
document.getElementById("todoListUL").innerHTML = todoArray;
console.log(todoArray);
}
But when the list times show up, they all have a comma between them, JSFiddle link for imagery here: JSFiddle
Why are they separated by this comma and how do I remove it?
toString()is implicitly called when you try to make an array a string - indocument.getElementById("todoListUL").innerHTML = todoArray;todoArray.join('[use a character here or not]')