Edit in JSFiddle

function makeQueryString(params) {
    return _.map(params, function (value, key) {
        return key + '=' + value;
    }).join('&');
}

var qs = makeQueryString({
    name: 'dave',
    loc: 'UK',
    category: 'Shoes'
});

console.log(qs);

              
            
          
            
              
                

              
            
          
            
              

External resources loaded into this fiddle: