Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function methodThatCleansUpStuff(){
// dont return anything cause you are just cleaning up
function doAsyncStuff() {
return methodThatGivesAPromise()
.then(()=>{throw new Error(“BOOM”)})
console.log('promise was resolved!!')
console.log('promise was rejected!!')
// this prints 'promise was resolved!!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.