console: groupCollapsed() static method
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Note: This feature is available in Web Workers.
The console.groupCollapsed()
static method creates a new inline group in the console. Unlike console.group()
, however, the new group is created collapsed. The user will need to use the disclosure button next to it to expand it, revealing the entries created in the group.
Call console.groupEnd()
to back out to the parent group.
See Using groups in the console in the console
documentation for details and examples.
Syntax
console.groupCollapsed()
console.groupCollapsed(label)
Parameters
label
Optional-
Label for the group.
Return value
None (undefined
).
Specifications
Specification |
---|
Console # groupcollapsed |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
groupCollapsed() static method |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- See implementation notes.