I have such code.
Array.forEach(item=>{
call Httprequest().then(result=>{
update var;
…
});
});
my question is how to sync var’s value before update. thanks.
I have such code.
Array.forEach(item=>{
call Httprequest().then(result=>{
update var;
…
});
});
my question is how to sync var’s value before update. thanks.
Look into the rxjs forkJoin operator.
thanks a lot, forkJoin can be used for my purpose.