Use Console like a Pro 😎 ;)

Use Console like a Pro 😎 ;)

Hey, JavaScript developers let's talk about console objects 🤠

This Console object provides access to the browser's debugging console. Use it efficiently .

1️⃣console.log();

The most used console.log(); method outputs a message to the web console. The message may be string or one or more javascript objects.

image.png

2️⃣console.assert();

This method writes an error message to the console if the assertion is false. If the assertion is true, nothing happens.

image.png

3️⃣console.count();

This method logs the number of time the particular console.count(); has been called.

image.png

4️⃣console.error();

This method outputs an error message in the console.

image.png

5️⃣console.warn();

console.warn() method outputs a warning message to the console.

image.png

6️⃣console.group();

The console.group() method creates a new inline group in the console . console.groupEnd() method exits the current inline group in the console.

image.png

7️⃣console.table();

The console.table() method displays data as a table.

image.png

image.png

8️⃣console.time();

The console.time() method starts a timer in the console view. When we use console.timeEnd() with the same name , the console will output the time.

image.png

9️⃣Styling console output

We can use %c directives to apply css style to console outputs.

image.png

image.png

This is for today guys , will again meet in next blog . If you find this blog interesting make sure you follow me on Twitter. Till then signing off signing off😎.