console: table() static method - Web APIs | MDN
The console.table() static method displays tabular data as a table.
console.table(data) console.table(data, columns)
The data to display. This must be either an array or an object. Each item in the array, or property in the object, is represented by a row in the table. The first column in the table is labeled (index) and its values are the array indices or the property names.
If the elements in the array, or properties in the object, are themselves arrays or objects, then their items or properties are enumerated in the row, one per column.
Note that in Firefox, console.table() is limited to displaying 1000 rows, including the heading row.
| (index) | firstName | lastName |
|---|---|---|
| daughter | 'Maria' | 'Jones' |
| father | 'Tyrone' | 'Jones' |
| mother | 'Janet' | 'Jones' |
No comments:
Post a Comment