Key Concepts

Review core concepts you need to learn to master this subject

Resolving JavaScript Promises

let promise1 = Promise.resolve(5); let promise2 = 44; let promise3 = new Promise(function(resolve, reject) { setTimeout(resolve, 100, 'foo'); }); Promise.all([promise1, promise2, promise3]).then(function(values) { console.log(values); }); // expected output: Array [5, 44, "foo"]

When using JavaScript async...await, multiple asynchronous operations can run concurrently. If the resolved value is required for each promise initiated, Promise.all() can be used to retrieve the resolved value, avoiding unnecessary blocking.

Async Await
Lesson 1 of 1

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo