Permalink
Browse files

implmented: async waterfall example

  • Loading branch information...
1 parent b0ee643 commit e73f46d965753ea57aa7b1bdd6c4ad04fd658c38 @bu committed Feb 6, 2013
Showing with 9 additions and 1 deletion.
  1. +9 −1 async.waterfall.js
View
@@ -1,7 +1,15 @@
var async = require("async");
async.waterfall([
-
+ function buySomething(callback) {
+ return callback();
+ },
+
+ function payTheBill(callback) {
+ return callback(true);
+ }
], function (err, result) {
+ console.log(err, result);
+
// result now equals 'done'
});

0 comments on commit e73f46d

Please sign in to comment.