\n
isn't really showed in the browser, other than in the source, and <br />
doesn't work in text()
as it doesn't accept html, html()
does
var c_list=['One','Two','Three']
for (var x in c_list){
holder_string += c_list[counter]
holder_string += "<br />"
counter++
$("#list").html(holder_string);
}
Note that you could just do
$("#list").html( c_list.join('<br />') );