When it comes to debugging we all depend on the browser's developer console, even the seasoned developers. All sort's of information from logs to error messages can be found here.

We all know the console.log(), console.info(), console.warn(), console.error(). But did you know that there are more than just four methods in the Console Object?

Let's look at some of its interesting methods.

console.clear();

As the name suggests, the clear() method will clear the debug console.

console.count(arg);

The count() method will display the number of times this method was called. count() an optional argument for displaying label. If a label was supplied, it will print the count after the label.

console.dir(obj);

The method dir() will print an interactive tree representation of a JavaScript Object.

console.table();

table() method will, well, print an Array argument as a table. Pretty handy huh?

console.trace();

The method trace() will print the stack trace of the console.

These are not the only methods the Console Object have. For more information, see the MDN documentation of Console.