Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@calvinmetcalf
Last active December 21, 2015 10:29
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 calvinmetcalf/6292608 to your computer and use it in GitHub Desktop.
Save calvinmetcalf/6292608 to your computer and use it in GitHub Desktop.
funnction asyncAdd(a,b,cb){
try{
cb(null,a+b);
}except(e){
cb(e);
}
}
asyncAdd(2,5,function(err,success){
if(err){
console.log('oh noes!');
}else{
console.log(success);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment