Could you please provide me with a brief explanation of the purpose of this function? From what I understand, it seems to be extracting variables from the URL and storing them in an Array Object, which is then returned for further processing.
However, I would appreciate more clarity on the matter.
function getUrlVars() {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for (var i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}