Location interface that is exposed by the global
Window object by your browser.
And you can access the
Location interface with:
Window is a global object in the browser, you can access it using this also:
And if you want the
href of the current page, use this:
There are also a ton of other useful properties in the location object.
Here are some examples for the page you are currently on:
As always, thanks for reading and happy coding!