Today I Learned - Rocky Kev

TIL about console.count and console.table

POSTED ON:

TAGS:

We know about our good friend console.log.

Meet console.count (and the support console.countReset)

These two methods are used to set and clear a counter of how many times a particular string gets logged in the console:

Also meet console.table

This particular method is incredibly useful to describe an object or array content in a human-friendly table:


Via https://levelup.gitconnected.com/moving-beyond-console-log-8-console-methods-you-should-use-when-debugging-javascript-and-node-25f6ac840ada


Related TILs

Tagged:

TIL about console.dir

If you console.log a element, you will get it's HTML markup. If you want it as a JS object, use console.dir instead

TIL adding a debug flag for custom features

Creating your own ?debug flag in your url to do some sweet debug stuff

TIL about console.count and console.table

Some different ways to show data via your console