Created
November 28, 2012 15:12
-
-
Save edjafarov/4161880 to your computer and use it in GitHub Desktop.
Nope, javascript don't have any problems with callbacks
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
| function day(me, next){ | |
| return me.on("7:00", wakedUp); | |
| function wakedUp(err, mood){ | |
| if(err){ | |
| return next(err); | |
| } | |
| me.eat(full) | |
| } | |
| function full(err){ | |
| me.telecommute() | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, there is the error handling if
full()function? :)