SHARE
TWEET

Untitled

a guest Feb 27th, 2020 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let x = async () => {
  2.   return 1;
  3. }
  4.  
  5. let y = async () => {
  6.   return 2;
  7. }
  8.  
  9. let z = async () => {
  10.     try {
  11.         let a = await x();
  12.         let b = await y();
  13.         console.log(a,b)
  14.     } catch (err) {
  15.         console.log(err)
  16.     }
  17. }
  18.  
  19. z().catch(console.log)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top