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.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.
As the name suggests, the
clear() method will clear the debug console.
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.
table() method will, well, print an Array argument as a table. Pretty handy huh?
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.