Skip to main content

currentURL

JS

Returns the current URL.

Use window.location.href to get the current URL.

const currentURL = () => window.location.href;
currentURL(); // 'https://google.com'