Skip to content

Instantly share code, notes, and snippets.

@chapel
Created June 19, 2012 00:22
Show Gist options
  • Save chapel/2951616 to your computer and use it in GitHub Desktop.
Save chapel/2951616 to your computer and use it in GitHub Desktop.
// nested
db.call(query, function (err, value) {
// do stuff here
nestedFn('foo', function (err, something) {
// do more stuff here
})
})
// below
db.call(query, gotValue)
function gotValue(err, value) {
// do stuff here
nestedFn('foo', gotSomething)
}
function gotSomething(err, something) {
// do more stuff here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment