
Using console.log() for JavaScript debugging is the most common practice among developers. But, there is more…
The console object provides access to the browser’s debugging console. The specifics of how it works vary from browser to browser, but there is a de facto set of features that are typically provided.
console.log() – For general output of logging information.console.info() – Informative logging of information.console.debug() – Outputs a message to the console with the log level debug.console.warn() – Outputs a warning message.console.error() – Outputs an error message.
Common Console methods
The console.log output can be styled in DevTools using the CSS format specifier.

console.log() CSS
When passing a string to one of the console object’s methods that accept a string (such as log()), you may use these substitution strings:
%s – string%i or %d – integer%o or %O – object