When they execute, they run a callback with the input provided. Inside that callback, do whatever you need to do that requires some input.
When they execute, they run a callback with the input provided. Inside that callback, do whatever you need to do that requires some input.
All I'm trying to say is that allowing custom defined objects to have the ability to block execution can be very handy in certain instances. I by no means was criticizing the alertify.js library
async.waterfall([ function getInput(){...}, function checkInput(){...}, function submitInput(){...}, ], function finally(){})
Each of the functions takes a callback, and returns err (if any) and output. If a callback returns err, it jumps to finally where you say what failed.
This is odd when you first get started with async, but it's really easy to visualize.
Think of a production line, with a number of different workers doing different stuff. If one of them gets a dud part, it throws it away.