Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js wait until 2 promises are resolved

const promise1 = //...
const promise2 = //...
Promise.all([promise1, promise2]).then(data => {
	const dataFromPromise1 = data[0]
	const dataFromPromise2 = data[1]
})
Source by flaviocopes.com #
 
PREVIOUS NEXT
Tagged: #js #wait #promises #resolved
ADD COMMENT
Topic
Name
7+2 =