nikolayneykov

Untitled

Dec 16th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const toPromise = async el => el;
  2.  
  3. const randomNumbersAsPromises = Array.from({ length: 10 }, () => toPromise(Math.random(0, 1)));
  4.  
  5. console.log(randomNumbersAsPromises);
Advertisement
Add Comment
Please, Sign In to add comment