currentURL Returns the current URL. Use window.location.href to get current URL. const currentURL = () => window.location.href; // currentUrl() -> 'https://google.com'