I read through various threads like this one for example.
But it really escapes me how to accomplish the following:
I have 4 functions, and want them happen one
If I'm using callbacks, my working solution now looks like this:
one(two);
function one(callb){
console.log('1');
callb(three);
}
function four(){
console.log('4');
}
function two(callb){
console.log('2');
callb(four);
}
function three(callb){
console.log('3');
callb();
}
I find that hideous. How am I supposed to keep track of this stuff if there is more than 2-3 sequences? Shudder...