YouTip LogoYouTip

Met Console Group

# HTML DOM console.group() Method [![Image 3: Console Object](#) Console Object](#) ## Example Create a group message in the console: console.log(""); console.group(); console.log(", this is inside the group."); [Try it Yourself Β»](#) * * * ## Definition and Usage The console.group() method is used to set the starting position of a group message. All messages after this position will be written to the group. **Tip:** Use the [console.groupEnd()](#) method to end the current group. **Tip:** Use the [console.groupCollapsed()](#) method to hide the group message. * * * ## Syntax console.group(label) * * * ## Browser Support The numbers in the table specify the first browser version that fully supports the method. | Method | | | | | | | --- | --- | --- | --- | --- | --- | | console.group() | Yes | 11.0 | 4.0 | 4.0 | Yes | * * * ## Parameter Values | Parameter | Type | Description | | --- | --- | --- | | _label_ | String | Optional. The group label. | * * * ## More Examples ## Example Use the console.groupEnd() method to end a group: console.log(""); console.group(); console.log(", this is inside the group."); console.groupEnd(); console.log("Out of the group!"); [Try it Yourself Β»](#) ## Example Set a label for the group message: console.log(""); console.group("TutorialLabel"); console.log("I am in the specified label group."); [Try it Yourself Β»](#) [![Image 4: Console Object](#) Console Object](#)
← Met Console LogMet Console Assert β†’