Skip to content

Instantly share code, notes, and snippets.

@ornicar
Forked from pulse00/gist:525418
Created August 15, 2010 12:00
Show Gist options
  • Save ornicar/525423 to your computer and use it in GitHub Desktop.
Save ornicar/525423 to your computer and use it in GitHub Desktop.
function someSynchronouseCall() {
var data = null;
someAsynchronousCall(function(response) {
data = response.data;
});
// is there some way to wait for the above callback before returning 'data' ?
return data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment