Ok, so I have a variable that contains some information that needs to go in a function. For example, if I have;
var apikey="123456789";
function foo() {
$.getJSON('http://api.websiteexample.com/ + apikey');
}
I'm looking to add some information that is stored in a variable to the end of a website address when requestion JSON data.
Is there way I've done in the example correct?
Thanks!