-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
47 lines (31 loc) · 1.64 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
title: "console: groupCollapsed() static method"
short-title: groupCollapsed()
slug: Web/API/console/groupcollapsed_static
page-type: web-api-instance-method
browser-compat: api.console.groupCollapsed_static
---
{{APIRef("Console API")}} {{AvailableInWorkers}}
The **`console.groupCollapsed()`** static method creates a new inline group in the console. Unlike {{domxref("console/group_static", "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 {{domxref("console/groupEnd_static", "console.groupEnd()")}} to back out to the parent group.
See [Using groups in the console](/en-US/docs/Web/API/console#using_groups_in_the_console) in the {{domxref("console")}} documentation for details and examples.
## Syntax
```js-nolint
groupCollapsed()
groupCollapsed(label)
```
### Parameters
- `label` {{Optional_Inline}}
- : Label for the group.
### Return value
None ({{jsxref("undefined")}}).
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- {{domxref("console/group_static", "console.group()")}}
- {{domxref("console/groupEnd_static", "console.groupEnd()")}}
- [Microsoft Edge's documentation for `console.groupCollapsed()`](https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/console/api#groupcollapsed)
- [Node.JS documentation for `console.groupCollapsed()`](https://nodejs.org/docs/latest/api/console.html#consolegroupcollapsed)
- [Google Chrome's documentation for `console.groupCollapsed()`](https://developer.chrome.com/docs/devtools/console/api/#groupcollapsed)