Q. What is the purpose of the await keyword?

  • (A) To wait for a Promise to resolve
  • (B) To block the main thread
  • (C) To delay function execution
  • (D) To create a loop
πŸ’¬ Discuss
βœ… Correct Answer: (A) To wait for a Promise to resolve
Explanation: await pauses execution until the Promise resolves or rejects.
Explanation by: Mr. Dubey
await pauses execution until the Promise resolves or rejects.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
67
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
82%
Success Rate