Skip to content

Instantly share code, notes, and snippets.

@orenmizr
Created January 6, 2017 00:23
Show Gist options
  • Save orenmizr/44e8662fbe9e8d740aa5b07b16d5dbe4 to your computer and use it in GitHub Desktop.
Save orenmizr/44e8662fbe9e8d740aa5b07b16d5dbe4 to your computer and use it in GitHub Desktop.
function buildQueryStrings(){
var queries = [];
var keys = Array.prototype.slice.call(arguments);
var val;
keys.forEach(function(key){
val = retreiveValue(key, config);
queries.push(key + "=" + val);
});
// queries.push(key + "=" + (config[key] ? config[key] : config[subkeys[0]][subkeys[1]])) ;
return "?" + queries.join("&");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment