Grouping console messages together
POSTED ON:
TAGS: javascript devtools
You can wrap console messages together using
console.group('name')
and console.groupEnd('name')
The MDN:
console.group()
Creates a new inline group, indenting all following output by another level. To move back out a level, call groupEnd().
console.groupCollapsed()
Creates a new inline group, indenting all following output by another level. However, unlike group() this starts with the inline group collapsed requiring the use of a disclosure button to expand it. To move back out a level, call groupEnd().
console.groupEnd()
Exits the current inline group.
Via Christian Heilmann's Developer Tools secrets that shouldn’t be secrets
Related TILs
Tagged: javascript