Ruphaa's Notes

How to get the current URL?

js

const currentURL = () => window.location.href;

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