Dynamically Creating / Implementing Data in A Table with a 2D Array in Javascript/Html

Viewed 78

The goal I am trying to achieve is to dynamically create a table with data based off of the info from a 2D array. I've seen examples of table creation with 1D arrays, but I can't seem to wrap around creating it with 2D. Furthermore, once this table is created, I need to be able to manipulate it, for example deleting a row with insignificant information etc. I like to use a nested for loop for this. This needs to be created with Javascript / Html. The table for example :

|item   | price | description|

|chicken | $20  | yummy |

And the array [0][0] is chicken, [0][1] is $20, [0][2] is yummy. Any help / leads are appreciated!.

3 Answers
Related