Текущий URL-адрес

const currentURL = () => window.location.href;
currentURL(); // 'https://www.google.com/'
Браузер JavaScript