Creates a new inline group in the Web 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.
Note: This feature is available in Web Workers.
Syntax
console.groupCollapsed([label]);
Parameters
label
- Label for the group. Optional.
Specifications
Specification | Status | Comment |
---|---|---|
Console API The definition of 'console.groupCollapsed()' in that specification. |
Living Standard | Initial definition |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
groupCollapsed | Chrome Full support 6 | Edge Full support 12 | Firefox Full support 52 | IE Full support 11 | Opera ? | Safari Full support 5.1 | WebView Android Full support 37 | Chrome Android Full support 18 | Firefox Android Full support 52 | Opera Android ? | Safari iOS ? | Samsung Internet Android Full support 1.0 |
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown