You should be taking the address from the result of the callback. Once the coordinates have been resolved you call a function that continues processing the returned value because only then do you have the return value. In the case your going through an array use the array index and update the address field once you have the required data. or process them individualy. work through the array making a request to google for every item. once the response comes back from google, move onto the next item in your array. If you can save the index so its known when the response arrives then it would be possible to wait for multiple requests.
var currentIndex = null;
function notifyAddressResolved (address) {
yourArray[currentIndex].address = address;
resolveNextAddress();
}
function getAddressFromlatlng(callback, lat, lng){
var geocoder = new google.maps.Geocoder();
var latlng = new google.maps.LatLng(lat, lng);
geocoder.geocode({'latLng': latlng}, function (results, status) {
callback(results[0].formatted_address);
});
}
function resolveNextAddress () {
if (currentIndex == null) {
currentIndex = 0;
} else {
currentIndex++;
}
getAddressFromlatlng(notifyAddressResolved, yourArray[currentIndex].lat, yourArray[currentIndex].lng);
}