I must admit that when I was new to JavaScript, every time I wanted to log something to the web console, it would look like this:

console.log('log message ...!')

In this guide, I will discuss the alternative ways of logging to the web console so that you can be more efficient in your development workflow, for debugging purposes in particular.

Before we look at the alternatives, let’s look at what the console.log() is really good at.

console.log()

The most common method of logging to the web console is via the console.log() method. It simply outputs a string message or some JavaScript object to the web console.

For simple string messages, console.log() is king.

#javascript

Learn the Different Ways of Logging to the Web Browser Console
1.05 GEEK