Guest User

Untitled

a guest
Oct 16th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. (function () {
  2. const test = async () => {
  3. await Promise.resolve();
  4. return Promise.reject();
  5. };
  6. test().then(() => console.log("then"), () => console.log("reject"));
  7. })();
  8.  
  9. (function () {
  10. const test = () => {
  11. return Promise.resolve().then(() => {
  12. return Promise.reject();
  13. });
  14. };
  15. test().then(() => console.log("then"), () => console.log("reject"));
  16. })();
Add Comment
Please, Sign In to add comment