From 6977db217077dc72ef8745e57516cbae6cb4ddc3 Mon Sep 17 00:00:00 2001 From: githrdw Date: Fri, 7 Dec 2018 10:53:06 +0100 Subject: [PATCH] Added console.warn and console.group (#24325) I have added console.warn and console.group functions --- .../tutorials/use-the-javascript-console/index.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/guide/english/javascript/tutorials/use-the-javascript-console/index.md b/guide/english/javascript/tutorials/use-the-javascript-console/index.md index f6abaad6bc..61e524fc67 100644 --- a/guide/english/javascript/tutorials/use-the-javascript-console/index.md +++ b/guide/english/javascript/tutorials/use-the-javascript-console/index.md @@ -14,3 +14,18 @@ This is how you print to the console: Also You can print an error log in the console with this code: console.error('I am an error!') + +Or you can print warning logs with the following code: + + console.warn('I am a warning!') + +If you want to group multiple console messages, you can use the `console.group`: + + console.group(); + console.log('Nothing happend yet...'); + console.log('Yet nothing to report'); + console.warn('Warning! Something went wrong'); + console.groupEnd(); + console.error('I am not part of the group'); + +Above example of the group is not collapsed by default, if you want to, use `console.groupCollapsed` instead.