5 Javascript console methods that you should know

For debugging or showing the output we use the console method in javascript. most developers just use the console.log() method but javascript has some awesome console methods that are less used but helpful. today I will discuss five console methods that may help you in debugging.

1. Console.table()

The console.table() method helps us to visualize complex arrays and objects in tabular format. we can also sort columns quickly using this method.

2. Console.trace()

console.trace() method is exactly the same as the console.log() method just different is it provides a stack trace along with a printing message. The console.trace() will give you a full stack trace of the functions including the files from which they are called.

3. Console.error()

The console.error() the method writes an error message to the console.

4. Console.count()

The console.count() method logs the number of time count() the method has been called. The count() the method accepts an argument but It is optional, its default value is "default".

5. Console.clear()

This is method is used to clear the console

Thank you for your time. if you found this helpful then hit a clap. 👏 and If you have any questions related to this post or this topic, do raise your questions in Counsily, where you can talk to verified experts directly and get answers. Counsily is a club for high intellect individuals to ask their questions & get personalized help from verified consultants. ask.counsily.com

Say hello on LinkedIn and Fiverr.




passionate about programming

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Build JavaScript Knowledge 10 Metter’s

Creating buttons in JavaScript that will submit form input value

Implementing the authorization protocol oAuth2 using Angular, Node and two tokens (Access and…

Testing JavaScript performance with Benchmark.js

Fast and Furious Images —  Web Performance Tuning Tips

The Reduce ({…Spread}) Anti-Pattern

REACT & its Lifecycles: The Basics

8 VSCode Extensions to make you the most efficient web developer in 2022

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ruhul Amin

Ruhul Amin

passionate about programming

More from Medium

5 Tricks Every JavaScript Developer Needs to Learn

Understand Array Destructuring in JavaScript

Some Modern Javascript Tricks

5 Settings Which Make VS Code Better