jquery - Correct Javascript syntax for concatenation -
i trying pull locations using foursquare api, , seemingly not writing syntax correctly. address = '<p><a href="http://maps.google.com/?q="' + venues.location.address + '">' + venues.location.address + '</p>'; although not throwing error, results in following code: <a href="http://maps.google.com/?q=">correct business name</a> the point is, query string google maps uses missing, , showing correctly in link text. doing wrong concatenation / syntax? try this: address = '<p>' + '<a href="http://maps.google.com/?q=' + encodeuricomponent(venues.location.address) + '">' + venues.location.address + '</p>';