The Table constructor.
new Table(headers, rows)
headers
An array of strings that represent the column headers.
rows
An array of arrays that represent the rows of the table.
A new Table object.
new Table(["Item", "Count"], [
["Bicycle", 5],
["Scooter", 2]
])
| Item | Count |
|---|---|
| Bicycle | 5 |
| Scooter | 2 |