--- title: currentURL tags: browser,beginner --- Returns the current URL. - Use `Window.location.href` to get the current URL. ```js const currentURL = () => window.location.href; ``` ```js currentURL(); // 'https://www.google.com/' ```