05 Console Methods-Monster Hack Tech

05 Console Methods



1. console.table()

Logging matrixes or even long arrays or

objects is a headache using the console.log0

method. console.table() is a much more

elegant way to do it.

2.console.trace()

Are you having issues debugging a

function? Left wondering how the execution

flows? console.trace() is your friend!

3. console.error()

Tired of boring logs? Spice things up

with console.error() and console.warn().

4. console.assert()

This is another brilliant tool for

debugging! If the assertion fails, the

console will print out the trace.

5. console.clear()

Naturally, you would need to clean it out for future use after logging so much information to the console. The best approach is to use the console.clear () method.


Author: @Ammar AshraF

Ammar AshraF

I am the CEO of Quick wise info

Post a Comment

Previous Post Next Post