[JavaScript] URL in Bestandteile zerlegen

// https://developer.mozilla.org/en-US/docs/Web/API/URL
// https://developer.mozilla.org/en-US/docs/Web/API/Location

// akt. URL zerlegen
let url = new URL(window.location.href);
console.log(url.protocol);
console.log(url.host);