How to log a message to the console?
console.log("Hello World!");
How to log a message to the console with a specific log level?
console.debug("a")
console.info("b");
console.warn("c");
console.error("d");
How to group (indent) log messages?
console.group("group header 1");
console.log("inside first group")
console.group("group header 2");
console.log("inside second group")
console.groupEnd();
console.groupEnd();
/* output:
group header 1
inside first group
group header 2
inside second group
*/
How to print the current stack trace?
console.trace("print stack trace");