Created
April 30, 2020 09:39
-
-
Save bitfishxyz/886feb984a949eee1b5197c4616662e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const promise1 = new Promise((resolve, reject) => { | |
const timer1 = setTimeout(() => { | |
resolve('success') | |
}, 1000) | |
}) | |
const promise2 = promise1.then(() => { | |
throw new Error('error!!!') | |
}) | |
console.log('promise1', promise1) | |
console.log('promise2', promise2) | |
const timer2 = setTimeout(() => { | |
console.log('promise1', promise1); | |
console.log('promise2', promise2); | |
}, 2000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment