console.groupEnd()
Closes the most recently opened console group.
Syntax
console.groupEnd()
Returns
undefined — Returns `undefined`.
Examples
console.group("Section");
console.log("inside");
console.groupEnd();
console.log("outside");
Output
Section
inside
outside
Notes
- Each `console.groupEnd()` closes one level opened by `console.group()`
or `console.groupCollapsed()`.
- Calling it without an open group has no effect.
Browser & runtime support
| Environment | Since version |
|---|---|
| chrome | 1.0 |
| firefox | 9 |
| safari | 4 |
| edge | 12 |
| node | 8.5 |