how to add an array li to ul with DOM code example
Example: append li to ul javascript
function function1() {
var ul = document.getElementById("list");
var li = document.createElement("li");
li.appendChild(document.createTextNode("Four"));
ul.appendChild(li);
}