Created
August 21, 2011 03:36
-
-
Save saturngod/1160076 to your computer and use it in GitHub Desktop.
testing node call back
This file contains 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
function callback_test(callback) { | |
for(var i=0;i<=10;i++){ | |
callback(i); | |
} | |
} | |
callback_test(function(result) { | |
console.log(result); | |
callback_test(function(result2){ | |
console.log(result2); | |
}); | |
}); |
This file contains 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
function callback_test(callback) { | |
for(i=0;i<=10;i++){ | |
callback(i); | |
} | |
} | |
callback_test(function(result) { | |
console.log(result); | |
callback_test(function(result2){ | |
console.log(result2); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment