Skip to content

Instantly share code, notes, and snippets.

@sebyx07
Created October 2, 2014 18:57
Show Gist options
  • Save sebyx07/a3f5cbe0e43a4c6f063e to your computer and use it in GitHub Desktop.
Save sebyx07/a3f5cbe0e43a4c6f063e to your computer and use it in GitHub Desktop.
result = plusTwo(20, function(err, result){
if err
console.log(err)
else
console.log(result)
});
plusTwo = function( param, callback){
if !param.instanceOf(Integer)
callback('integer required', null)
else
callback('null', param + 2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment