Skip to content

Commit

Permalink
last test333
Browse files Browse the repository at this point in the history
  • Loading branch information
abstain23 committed May 19, 2020
2 parents 2e8bdec + 3deb34a commit ba3e438
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ class MyPromise {
then(onResolved, onRejected) {
typeof onResolved === 'function' && this.onResolvedCbs.push(onResolved)
typeof onRejected === 'function' && this.onRejectedCbs.push(onRejected)
return this
return this
}
}

new MyPromise((resolve,reject) => {
setTimeout(() => {
resolve(2)
resolve(3)
},1000)
}).then(res => {
console.log(res)
Expand Down

0 comments on commit ba3e438

Please sign in to comment.