Q. Which of the following is used to create a new Promise?

Code:
let p = new Promise((resolve, reject) => {});
  • (A) Correct syntax
  • (B) Incorrect syntax
  • (C) Deprecated
  • (D) Throws error
πŸ’¬ Discuss
βœ… Correct Answer: (A) Correct syntax
Explanation: This is the correct way to create a new Promise.
Explanation by: Chandani
This is the correct way to create a new Promise.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
84
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Chandani
Publisher
πŸ“ˆ
96%
Success Rate