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.
2️⃣console.assert();
This method writes an error message to the console if the assertion is false. If the assertion is true, nothing happens.
3️⃣console.count();
This method logs the number of time the particular console.count(); has been called.
4️⃣console.error();
This method outputs an error message in the console.
5️⃣console.warn();
console.warn() method outputs a warning message to the console.
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.
7️⃣console.table();
The console.table() method displays data as a table.
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.
9️⃣Styling console output
We can use %c directives to apply css style to console outputs.
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😎.