English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML DOM console.groupEnd() Method

 JavaScript Console Object

console.groupEnd()Method exits the current inline group in the console.

Usageconsole.group()Method creates a new inline group.

Usageconsole.groupCollapsed()Method starts a collapsing message group.

Syntax:

console.groupEnd()
console.log("This is the outer level");
console.group();
console.log("Level 2");
console.group();
console.log("Level 3");
console.warn("More of level 3");
console.groupEnd();
console.log("Back to level 2");
console.groupEnd();
console.log("Back to the outer level");
Test See‹/›

Browser Compatibility

All browsers fully support the console.groupEnd() method:

Method
console.groupEnd()YesYesYesYesYes

 JavaScript Console Object