Debugging with javascript console makes me stay productive cover image

Debugging with javascript console makes me stay productive

Saibal Roy • February 1, 2020

javascript productivity-tips

Hello Everyone!

Welcome to my website and this is Saibal with yet another post to share my knowledge with you all.

Debugging with javascript during the development console.log() is a life saver for me. If you all are too in the same page with me then this post will make your debugging looks cool and helpful too.

If you want to refresh your knowledge for console.log(). Here's the link to it down below to help you know more about it. read

I focus more on the visuals that are more readable and expressive. Here's what i mean by that.

Well this is how I use to quickly check in the google chrome developers console. Cool right!

function Employee(fullName, empCode) {
  this.fullName = fullName;
  this.empCode = empCode;
}

let employee = new Employee("John Doe", "EMP001");
console.table(employee);

You can see the output in your chrome dev console or check the reference image shown in this post. Doesn't it looks cool?

Another cool feature is console.dir() and let's see it in action again with the google chrome developers console.

console dir image in chrome dev console

console.dir(document.doctype)

Great to add these to your javascript skills.

If you are interested to know more about some cool features of the console object. Feel free to dive into more of these bonus skills 😀.

Check out how console.info() works

Check out how console.trace() works

Check out how console.warn() works

Check out how console.error() works

Check out how console.clear() works

Cool!!! 😆 😆 😆

Happy learning folks!