Q. How do you catch both resolved and rejected states of a Promise?

  • (A) then().catch()
  • (B) catch().then()
  • (C) done().fail()
  • (D) async()
πŸ’¬ Discuss
βœ… Correct Answer: (A) then().catch()
Explanation: Chaining then() and catch() handles both resolve and reject outcomes.
Explanation by: Mr. Dubey
Chaining then() and catch() handles both resolve and reject outcomes.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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