js wait until 2 promises are resolved

Solutions on MaxInterview for js wait until 2 promises are resolved by the best coders in the world

showing results for - "js wait until 2 promises are resolved"
Gabriele
05 Jul 2018
1const promise1 = //...
2const promise2 = //...
3Promise.all([promise1, promise2]).then(data => {
4	const dataFromPromise1 = data[0]
5	const dataFromPromise2 = data[1]
6})