I am trying to send window.location to a variable, but my method doesn't seem to be working.
I have one variable that is the query called query and another caller firstPart. I concatenate them and am trying to sent window to that concatenated URL, but it doesn't seem to work.
Here is what I have so far:
var query = "hello";
var firstPart = "http://google.com/?=";
window.location.assign(firstPart + query);
.assign()isn't necessary (but it does work!).window.location.href = firstPart + query