Created
February 4, 2020 08:02
-
-
Save ibare/8833170781d1ba0d4b0e3803620ac376 to your computer and use it in GitHub Desktop.
This file contains 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
Promise.resolve() | |
.then(() => { | |
return 'OK' | |
}) | |
.then(a => `${a} ${Date.now()}`) | |
.then(b => new Promise((resolve) => { | |
setTimeout(() => resolve(`${b} + delay`), 1000); | |
})) | |
.then(out => console.log(out)) | |
.catch(e => console.error(e)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment