We have an array of customer objects and we want to log them in a table format.
Approach
Use console.table
.
const customers = [
{ id: 1, name: 'Cookie Monster' },
{ id: 2, name: 'Swedish Chef' },
];
console.table(customers);
We have an array of customer objects and we want to log them in a table format.
Use console.table
.
const customers = [
{ id: 1, name: 'Cookie Monster' },
{ id: 2, name: 'Swedish Chef' },
];
console.table(customers);