Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- const test = async () => {
- await Promise.resolve();
- return Promise.reject();
- };
- test().then(() => console.log("then"), () => console.log("reject"));
- })();
- (function () {
- const test = () => {
- return Promise.resolve().then(() => {
- return Promise.reject();
- });
- };
- test().then(() => console.log("then"), () => console.log("reject"));
- })();
Add Comment
Please, Sign In to add comment