Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. console.log('A');
  2.  
  3. (async () => {
  4. try {
  5. const result = await new Promise((resolve, reject) => {
  6. resolve('B');
  7. });
  8. console.log(result); // B
  9. } catch (e) {
  10. console.log('caught something');
  11. }
  12. })();
  13.  
  14. console.log('C');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement