Skip to content

Instantly share code, notes, and snippets.

@palashmon
Created August 18, 2020 07:04
Show Gist options
  • Save palashmon/cdbfe6742a98113cc4c71299edc564c0 to your computer and use it in GitHub Desktop.
Save palashmon/cdbfe6742a98113cc4c71299edc564c0 to your computer and use it in GitHub Desktop.
Simple grouping of messages using console.group() & console.groupEnd()
/**
* @file Simple grouping of messages in console
* @author Palash Mondal
*/
const url = new URL('http://example.com:3000/blog?startIndex=1&pageSize=10');
console.group("URL Details");
console.log(`Hostname: ${url.hostname}`);
console.log(`Pathname: ${url.pathname}`);
console.log(`Protocol: ${url.protocol}`);
console.groupEnd();
@palashmon
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment