the third-party js, I called has several methods to execute promise, as follows:
function init(){
a();
b();
c();
//
....
...
}
function a(){
var q = [x,y]; //promise
Promise.all(q).then(function(arr){
.....
});
}
function b(){
var q = [m,n]; //promise
Promise.all(q).then(function(arr){
.....
});
}
function c(){
var q = [j,k]; //promise
Promise.all(q).then(function(arr){
.....
});
}
my calling function:
function call(){
init();
//initpromise,
......
}
my confusion is that I cannot modify the above third-party code in the, call () function to ensure that all the promise in the init has been executed. I would appreciate your advice.