I want to store a value from a JSON object in a global variable to use later in my code. Apparently this does not work even though it should make the country
variable global.
$.getJSON(reverseGeoRequestURL, function(reverseGeoResult){
window.country = reverseGeoResult.results[0].locations[0].adminArea1;
});
console.log(window.country);