[Solved] Unable to declare variable named “location” in JavaScript
[ad_1] Global variables in the browser are automatically properties of the window object. Assigning to window.location is how you perform a redirect in Javascript. E.g. window.location = ‘http://www.google.com’; will redirect the page to Google. An empty URL means to use the URL of the current page, so you’re telling it to redirect to itself, which … Read more