Created
March 8, 2021 11:32
-
-
Save jaydson/f1ff5431403194e45eae16fc8a754cd3 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(function(resolve, reject) { | |
console.log('A'); // será executado reject(); | |
// irá rejeitar a promise | |
console.log('B'); // será executado | |
throw(new Error('Falhou')); // lança uma excpetion | |
console.log('C'); // não será executado | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment