Hi!
im working on the wikpedia viewer for Free Code Camp .And im looking for a nice way to display my Array data in a column:i tried to print them one by one but it takes to long .im looking for smth much simpler
Thank u D
Hi,
Not sure if understood correctly what you mean, But if you have a array with results you can iterate through it and append the results into a class. Something like this maybe, in shorthand.
html=ββ;
for (var i=0; i<arr.length; i++){
html =β<div class=βresultβ>+arr[i]+</div>β;
//append html to βmain(container)β class
}
thanks but i did smth else
for(var i=0;i<data[1].length;i++){
$(β#outputβ).prepend("
}
1 Like