Created
August 18, 2020 07:04
-
-
Save palashmon/cdbfe6742a98113cc4c71299edc564c0 to your computer and use it in GitHub Desktop.
Simple grouping of messages using console.group() & console.groupEnd()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @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(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here are some useful links:
console.group()
MDN Docsconsole.groupEnd()
MDN Docsnew URL()
MDN Docs