Guest User

Untitled

a guest
Nov 12th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. async function load() { // ES7
  2. let fooPromise = foo();
  3. let barPromise = bar();
  4.  
  5. // foo and bar are executed before Promise.all
  6. let results = await Promise.all([fooPromise, barPromise]);
  7. console.log(results);
  8. }
Add Comment
Please, Sign In to add comment