function foo(a, b, callback) {
if (a > b) {
callback(a + ' is greater then ' + b);
}
if (a < b) {
callback(a + ' is less then ' + b);
}
};
foo(1, 2, function (response) {
console.log(response);
});
Created
April 5, 2016 18:15
-
-
Save betweenbrain/e0e3d30a12f0b58a805f536b0c7d76da to your computer and use it in GitHub Desktop.
Node.js Callback
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment