Implement a Promise Class

Without using the built-in Promise, implement a MyPromise class (the original required JavaScript; here expressed in Python) supporting:

  • A constructor taking executor(resolve, reject); if the e...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: