The log()
method of the Console object is commonly used to display output and it works great. When working with objects or arrays that give rise to larger data, such as:
const data = [
{
id: 1,
name: 'John Doe',
age: 30}
,{
id: 2,
name: 'Jane Doe',
age: 40
},
{
id: 3,
name: 'Mary Doe',
age: 50
}
]
Running console.log(data)
will output the following to the terminal:

Drilling through individual values can be tiresome, so an even easier way to display the data is by using console.table(data)
, which will tabulate the output instead:

As the data grows in complexity, this is a great method that can display an object or an array of objects that hold similar keys.
#TIL
#TheMoreYouKnow