代码示例:(标识:jsck_console_groupend)
<!DOCTYPE html>
<html>
<body>

<h1>JavaScript console.groupEnd() 方法</h1>

<p>按键盘上的 F12 可在控制台视图中查看消息。</p>

<script>

console.log("Hello world!");
console.group();
console.log("Hello again, this time inside a group!");
console.groupEnd();
console.log("and we are back.");

</script>

</body>
</html>
运行结果: