My function is like this.
function getLatLong(address){
    var latitude="";
    var geocoder =  new google.maps.Geocoder();
    geocoder.geocode( { 'address': address}, function(results, status) {
        latitude = results[0].geometry.location.lat();
        alert(latitude);
});
   return latitude;
}
  alert(getLatLong(co));
when i call this function I get empty result but the alert in the function returns the latitude.what the problem?
 
     
     
    