JavaScript Async/Await - Exercise 2

Review the Async/Await behavior described in the question, then use the example to test your understanding.

javascript

// How can an async function return a computed result?
const topic = 'async-await';
console.log(topic);

Review the Async/Await behavior described in the question, then use the example to test your understanding.

javascript

// What happens when await receives a fulfilled promise?
const topic = 'async-await';
console.log(topic);

Review the Async/Await behavior described in the question, then use the example to test your understanding.

javascript

// What happens when await receives a rejected promise?
const topic = 'async-await';
console.log(topic);

Review the Async/Await behavior described in the question, then use the example to test your understanding.

javascript

// How can a caller handle a rejected async function?
const topic = 'async-await';
console.log(topic);

Review the Async/Await behavior described in the question, then use the example to test your understanding.

javascript

// When should sequential awaits be used?
const topic = 'async-await';
console.log(topic);

Review the Async/Await behavior described in the question, then use the example to test your understanding.

javascript

// When should independent work use Promise.all?
const topic = 'async-await';
console.log(topic);

Review the Async/Await behavior described in the question, then use the example to test your understanding.

javascript

// What does Promise.all do if one operation rejects?
const topic = 'async-await';
console.log(topic);

Review the Async/Await behavior described in the question, then use the example to test your understanding.

javascript

// How can a timeout promise be combined with a request?
const topic = 'async-await';
console.log(topic);

Review the Async/Await behavior described in the question, then use the example to test your understanding.

javascript

// Why should errors retain useful context when rethrown?
const topic = 'async-await';
console.log(topic);

Review the Async/Await behavior described in the question, then use the example to test your understanding.

javascript

// How can an async function guarantee cleanup?
const topic = 'async-await';
console.log(topic);