Console methods for better logging

With context

Put variables into an object, it will be easier to see what you are looking at.

const data1 = "Testing";
const data 2 = " line";
console.log( data1, data2 );
    // > "Testing line"
console.log( {data1, data2} );
   // > { data1: "Testing", data2: "line" };

Using colors and styles

console.log('%cSome text here', 'background-color: red;')
   // > Some text (with styling applied

Console.table()

Handy display of arrays of objects

const someData = [
     { ID: 1, name: "text"},
     { ID: 2, name: "line"}
]
console.table(someData);

Grouping lines

console.group("Title of a group");
...
console.groupend();

$_ and $$

Trace()

Useful to trace what's calling what

console.trace();

Console.dir()

Inspect a DOM node in an object view, instead of a markup view.

Also could be used to inspect complex objects to add some options, see them in color and with greater depth of nesting

console.dir(node, {
    colors: true,
    depth: null
}