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" };
console.log('%cSome text here', 'background-color: red;')
// > Some text (with styling applied
Handy display of arrays of objects
const someData = [
{ ID: 1, name: "text"},
{ ID: 2, name: "line"}
]
console.table(someData);
console.group("Title of a group");
...
console.groupend();
Trace()
Useful to trace what's calling what
console.trace();
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
}