I am writing an application in Javascript and JQuery and I need to follow a sequential order on functions calls, so I've thought in using a queue. I have seen this, but (if is possible) I would prefer abstract or avoid function(next) in my function calls like example below because I have a lot of custom functions:
var fn1 = function(next){
console.log("I am FN1");
next();
};
Is it possible or there are another alternative and I don't know it?