Skip to content

Instantly share code, notes, and snippets.

@ncb000gt
Created September 8, 2011 19:08
Show Gist options
  • Save ncb000gt/1204369 to your computer and use it in GitHub Desktop.
Save ncb000gt/1204369 to your computer and use it in GitHub Desktop.
Async/Cb
db.get(key, function(err, doc) {
cb(err, doc);
});
db.get(key, cb);
function cb(err, val) {
console.log(err);
console.log(val);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment