You can group related log statements by surrounding them with the
console.group()
and console.groupEnd()
functions:console.group("URL Details");
console.log("Scheme: HTTPS");
console.log("Host: example.com");
console.groupEnd();
All log statements issued in between will be displayed as a group in the console view:
Notice that these grouping functions are a non-standard feature. They're supported in every modern browser, though, starting with Internet Explorer 11.
No comments:
Post a Comment