Created
October 31, 2017 20:45
-
-
Save gskachkov/343834625aba89ab648c3a2249d5044f 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
Promise.reject('reject') | |
.finally(() => console.log('finally#1')) | |
.catch(error => console.log('catch#1', error)) | |
.catch(error => console.log('catch#2', error)); | |
//finally#1 | |
//catch#1 reject | |
Promise.resolve('resolve') | |
.then(result=> { console.log('then#1', result); return Promise.resolve('next-step'); }) | |
.finally(() => console.log('finally#1')) | |
.then(result => console.log('then#2', result)); | |
//then#1 resolve | |
//finally#1 | |
//then#2 next-step |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment