Asynchronous JavaScript

Use callbacks promises and async await.

1. What is the primary purpose of using async/await in JavaScript?
2. Which of the following are examples of microtasks in JavaScript?
3. The event loop is responsible for executing code, collecting and processing events, and handling subtasks in JavaScript.
4. What does the acronym 'API' stand for in the context of asynchronous operations?
5. Which method is used to attach a callback function that executes when a promise is rejected?
6. Which of the following operations are typically asynchronous in JavaScript?
7. A JavaScript promise can transition from the 'rejected' state back to the 'pending' state.
8. What keyword is used to declare an asynchronous function that implicitly returns a promise?
9. What will the following code log to the console? console.log('Start'); setTimeout(() => { console.log('Timeout'); }, 0); Promise.resolve().then(() => { console.log('Promise'); }); console.log('End');
10. Which of the following statements about JavaScript promises are true?
Answered 0 of 0 — 0 correct