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.

* The most common Console methods:

Common Console methods

* Custom CSS styles for a console.log()

The console.log output can be styled in DevTools using the CSS format specifier.

console.log() CSS

* String substitutions

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: