Last updated 2 years ago
Instead of objects you can also provide arrays in your dataset. In this case the indicies are used as column names.
Output:
Provide arrays in your dataset.
0 1 2 =========================== Homer Simpson 39 Marge Simpson 36 Bart Simpson 10 Lisa Simpson 8 Maggie Simpson 1
import { Table } from 'voici.js' const data = [ ['Homer', 'Simpson', 39], ['Marge', 'Simpson', 36], ['Bart', 'Simpson', 10], ['Lisa', 'Simpson', 8], ['Maggie', 'Simpson', 1] ]; const table = new Table(data); table.printPlain();