title: Handling multiple promises in node
body: <p>I have the following scenario to implement in node. </p>
  
  <ol>
  <li>Printing random words inside a loop.</li>
  <li>There is an asynchronous function to call for that <strong>(printRandomWord)</strong>.</li>
  <li>The function has a delay of 0.5 seconds to get the response. </li>
  <li>I have to call this function inside a loop from 1 to 20.</li>
  <li>It takes 10 seconds to print 20 random words since the printRandomWord has a 0.5 s delay.</li>
  </ol>
  
  <p>What I want to do is, print 20 random words in less than 1 second. </p>
  
  <p>I was told that there is a way to do that, but I couldn't find the solution yet. </p>
  
  <p>This is my code. </p>
  
  <pre><code> const printWords = async () =&gt; {
     for (let x = 1; x &lt;= 100; x++) {
       console.log(await printRandomWord());
     }
   };
  </code></pre>