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