Skip to content

Instantly share code, notes, and snippets.

@tristanls
Created June 13, 2014 04:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tristanls/b590b7434fd04bf6e2e3 to your computer and use it in GitHub Desktop.
Save tristanls/b590b7434fd04bf6e2e3 to your computer and use it in GitHub Desktop.
function dostuff(callback) {
task1(function(x) {
task2(x, function(y) {
task3(y, function(z) {
if (z < 0) {
callback(0);
} else {
callback(z);
});
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment