(function(){ | |
const promise = new Promise((resolve, reject) => resolve(100)); | |
promise | |
.then(function(value){ | |
console.log('then =>' + value); | |
}) | |
.then(() =>{ | |
return 200 | |
}) | |
.then(function(value){ | |
console.log('then =>' + value); | |
return 300 | |
}) | |
.then(function(value){ | |
console.log('then =>' + value); | |
throw 'Я иду в catch' | |
}) | |
.catch(function(value){ | |
console.log('cath =>' + value); | |
return 500 | |
}) | |
.then(function(value){ | |
console.log('then =>' + value); | |
return 600 | |
}) | |
.then(function(value){ | |
console.log('then =>' + value); | |
return 700 | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
then =>100
then =>200
then =>300
cath =>Я иду в catch
then =>500
then =>600