Do more with the browser’s in-built JavaScript console

Most would be familiar with the god-send console.log() used for debugging web applications.
Many modern browsers also implement several other handy console functions for when you need to do a little extra with the console. These functions are :

  • console.warn()
  • console.error()
  • console.debug()

Here is how they look in Chrome’s console :

The different flavors of console logging

The different flavors of console logging

Common use-cases for these include helpful messages in development code or libraries and anything else you can think of.

Chrome’s Developer Tools also supports a nifty console.memory object which can help debug performance bottlenecks in your front-end applications.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

2020 All rights reserved | Powered by WordPress
Back to top
Theme by