How to get the current URL?

Aug 31, 2022
const currentURL = () => window.location.href;

// Example
currentURL(); // 'https://google.com'