This is a bit annoying since if you want to make three async requests you have to write the following
Well, beyond a style issue. You can unfold the events and make it a lot less "annoying".
Consider,
var cb1 = function() {
}
var cb2 = function() {
req(cb1);
}var cb3 = function() {
req(cb2);
}req(cb3);
It's a lot cleaner and it looks like a state machine (and kind of looks like erlang/message passing).