This is the code :
list = ["Alex","John","Kit","Lenny"];
for(var i = 0; i < 4; i++) {
$("body").append("<p> list[i] </p>');
};
Look at the for loop(yes this is using jquery),i want to add the list items inside the paragraph headers.How do i do it ?
$("body").append("<p>" + list[i] + " </p>")or$("body").append(['<p>',list[i],'</p>'].join())