Closeup of pushpin showing the location on the map

Location Object

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

The way we can use it is as follows…


This will log out the url of the page.

Happy Coding!

Clay Hess

Share this post

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on pinterest
Share on print
Share on email
Skip to content