Instructions
- 1. Your final score will reflect your grasp of the concepts—approach each question with precision.
- 2. Thoroughly review each solution before proceeding to ensure full understanding.
- 3. Final results will be available after submission to provide insights into areas for further improvement.
- 4. Maintain academic integrity—plagiarism undermines learning and professional growth.
- 5. Once submitted, responses are final, so ensure you’re confident in your answers.
- 6. These challenges are designed to test practical knowledge; apply your skills as you would in real-world scenarios.
All Problems
Question
Action
What does the following code output?
How do you handle a promise rejection in an async function?
Can you use await outside of async functions in JavaScript?
What happens if you forget to use await in front of a promise inside an async function?
How do you return multiple resolved promises in parallel using async/await?
What is the purpose of Promise.all() in combination with async/await?
What will the following code output?
What will happen if an await statement is used on a non-promise value?
What will happen if you await a rejected promise without handling the rejection?
Which of the following is an incorrect way to use await with an asynchronous function?
What does the following code output?
async function test() { return "Hello"; } test().then(console.log);
How do you handle a promise rejection in an async function?
Can you use await outside of async functions in JavaScript?
What happens if you forget to use await in front of a promise inside an async function?
How do you return multiple resolved promises in parallel using async/await?
What is the purpose of Promise.all() in combination with async/await?
What will the following code output?
async function test() { let result = await Promise.resolve("Success"); console.log(result); } test();