Last active
January 26, 2019 08:32
-
-
Save irridescentrambler/a32c780a8b3c90f75f71d785b7d19988 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
new Promise((resolve, reject) => { | |
console.log('Initial'); | |
resolve(); | |
}) | |
.then(() => { | |
throw new Error('Something failed'); | |
console.log('Do this'); | |
}) | |
.catch(() => { | |
console.log('Do that'); | |
}) | |
.then(() => { | |
console.log('Do this, no matter what happened before'); | |
}); | |
// Output | |
// Initial | |
// Do that | |
// Do this, no matter what happened before |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment