-
-
Save WesleySmits/6d94da20453fac25720ba1b41ec4b360 to your computer and use it in GitHub Desktop.
URL Object: Construct URL Object
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
// Pass a full URL | |
const url = new URL('https://medium.com/@WesleySmits'); | |
// Pass a path with the base URL as the second parameter | |
const url2 = new URL('@WesleySmits', 'https://medium.com/'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment