Get URL with JavaScript
At some point in time you need to get the current URL and do some logic based on it. JavaScript has handy API called window.location which has all the information related to the windows current location. Running console.log(window.location); in the console or your JavaScript file will return the following Location object: Having a reference to the location you are now … Read more