2.1.30 Location Object

The location object gives us information on the url such as the href. Check out the properties and methods on MDN…

https://developer.mozilla.org/en-US/docs/Web/API/Location

The way we can use it is as follows…

This will log out the url of the page.