URL()
Description
Creates an instance of URL.
Syntax
new URL(url)new URL(url, base)
Parameters
new URL(url, base?)
urlbase?
A string containing the full or partial URL.
An optional string containing the base of the URL.
Return Value
A URL object representing the given URL.