Created
October 2, 2014 18:57
-
-
Save sebyx07/a3f5cbe0e43a4c6f063e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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