[Solved] Simple JavaScript append array link ids to html doc? [closed]


var myArray = ["id1", "id2", "id3"];
var container = document.getElementById('container');
myArray.forEach(function(id){
  container.innerHTML =  container.innerHTML + "<a href=\""+id+"\">"+id+"</a>"
}); 

http://jsfiddle.net/suwJr/

solved Simple JavaScript append array link ids to html doc? [closed]