0

How can I put the atributes of an array in a table?

I want to put the content of an array in a table. Each index in a diferent cell. What is the best way to do it? Thank you

13th May 2019, 10:46 AM
Pedro Luis
Pedro Luis - avatar
4 Réponses
+ 1
use for loop, a pseudo code: create element td { for number of tr create element tr { for number of td create element td td innerText tr append child td } table append child tr } body append child table
13th May 2019, 3:46 PM
Gordon
Gordon - avatar
13th May 2019, 10:57 AM
Gordon
Gordon - avatar
0
Thanks but how can i put there the arrays index?
13th May 2019, 11:25 AM
Pedro Luis
Pedro Luis - avatar
0
React way to set array objects to a table https://code.sololearn.com/WkopXPt58yiX/?ref=app
14th May 2019, 9:41 AM
Calviղ
Calviղ - avatar