Skip to content

Instantly share code, notes, and snippets.

@edjafarov
Created November 28, 2012 15:12
Show Gist options
  • Select an option

  • Save edjafarov/4161880 to your computer and use it in GitHub Desktop.

Select an option

Save edjafarov/4161880 to your computer and use it in GitHub Desktop.
Nope, javascript don't have any problems with callbacks
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()
}
}
@alexbeletsky
Copy link
Copy Markdown

Hey, there is the error handling if full() function? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment