Search This Blog

Wednesday, November 21, 2018

Console.table() displays tabular data as a table.

This function takes one mandatory argument data, which must be an array or an object, and one additional optional parameter columns.

It logs data as a table. Each element in the array (or enumerable property if data is an object) will be a row in the table.

The first column in the table will be labeled (index).

// an array of strings

console.table(["it", "i88", "ca"]);