I have a number for functions of the form:
function A() {
asychProcessA(
someCallBack();
)
}
function B() {
asychProcessB(
someCallBack();
)
}
function C () {
asychProcessC(
someCallBack();
)
}
Several times I want to implement these functions sequentially, for example:
function A() {
asychProcessA(
functionB();
)
}
But I also want the implementation option for one of them to be individually with a different callback, for example
function A() {
asychProcessA(
someOtherCallBack();
)
}
Can someone suggest an elegant and versatile way to fix this. I use jQuery in this project to make fair play.
source
share