Every one of us has used console.log for debugging more than we care to admit. I use it multiple times a day to verify my changes but mostly do this with only console.log. Yet the console API provides way more functionality than that — more functionality than most of us are aware of.

We can use it not just for logging, but also to debug performance issues or to validate changes with assertions. This article is a collection of nine different use cases of the console API that can help you with debugging on top of console.log.

Let’s start at the very beginning with the simple things we all know: log levels.


9 Different Use Cases of console.log

#javascript #web-development #frontend #debugging #webtips

9 Different Use Cases of console.log
1.15 GEEK