I\'m trying to loop through an Array which then uses innerHTML to create a new
Change your for loop:
for
for (i = 0; i <= (n-1); i++) { var list = names[i]; var myList = document.getElementById("list"); myList.innerHTML += ""+ list + "" + ""; }
Use += instead of =. Other than that, your code looks fine.
+=
=