const myFirstPromise = new Promise((resolve, reject) => {
// ?做一些异步操作,最终会调用下面两者之一:
//
// resolve(someValue); // fulfilled
// ?或
// reject("failure reason"); // rejected
});
// 基本状态
class MyPromise(fn) {
static PENGDING = 'pending';
static RESOLVED = 'resolved'; // fulfilled
static REJECTED = 'rejected';
constructor(callBackFun) {
this.
}
}