Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // - 1 -
- // after fullfill -> always
- Promise.resolve(42)
- .then(() => console.log('after fullfill'))
- .catch(() => console.log('after reject'))
- .finally(() => console.log('always'));
- // - 2 -
- // after reject -> always
- Promise.reject(42)
- .then(() => console.log('after fullfill'))
- .catch(() => console.log('after reject'))
- .finally(() => console.log('always'));
Add Comment
Please, Sign In to add comment