Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 356 Bytes

File metadata and controls

18 lines (14 loc) · 356 Bytes

Lets say I have this

this.getList();
this.getServers();
this.getCredentials();
console.log("waited");

What would be a way to console.log only after the other 3 finished? and those 3 are actually API calls.

Solution -

Promise.all([this.getList(), this.getServers(), this.getCredentials()]).then(
  () => console.log("waited")
);