Constructor
URL()
Creates and returns a URL object referencing the URL specified using an absolute URL string, or a relative URL string and a base URL string.
nebuď blb a prečítaj si najskôr odkaz....
const url = new URL(url_in_variable_string)
console.log(url.pathname);
console.log(url.searchParams.get("some_param"));
atď....