var a = document.createElement('a');
a; //<a></a>
a.href; // ""
/* a does not have an href at the moment */
/* let's make a new URL */
a.protocol = 'https:';
a.host = 'goog1e.com';
a.pathname = 'find-something';
a.search = 'q=search phrase';
a; // <a href="https://goog1e.com/find-something?q=search%20phrase"></a>
a.href; // "https://goog1e.com/find-something?q=search%20phrase"
/* a now has an href, and it's a compiled URL from all the bits we supplied
/* now let's change the domain (host) */
a.host = 'example.org'; // Set the host to example.org
a.href; // "https://example.org/find-something?q=search%20phrase"
/* the new URL contains the new domain we used */