title: Using "map" with promises returns ordered and unordered results
body: <p>I have this piece of code:</p>
  
  <pre><code>const Axios = require('axios');
  const baseURL = 'https://jsonplaceholder.typicode.com';
  
  async function main() {
      const posts = await Axios(`${baseURL}/posts`);
      const users = await Promise.all(posts.data.map( async (post, index) =&gt; {
          let d = await Axios(`${baseURL}/users/${post.userId}`);
          return d.data.name;
      }))
  
      users.map( (user, index) =&gt; {
          console.log( `${index}. ${user}` );
      });
  }
  </code></pre>
  
  <p>And outputs the result in order:</p>
  
  <pre><code>1. Patricia
  2. Glenna
  3. Nicholas
  4. Kurtis
  5. Chelsey
  </code></pre>
  
  <p>Everything Ok, but ... If I do:</p>
  
  <pre><code>async function main() {
      const posts = await Axios(`${baseURL}/posts`);
      await Promise.all(posts.data.map( async (post, index) =&gt; {
          let d = await Axios(`${baseURL}/users/${post.userId}`);
          console.log( `${index}. ${d.data.name}` );
      }))
  }
  </code></pre>
  
  <p>the <code>console.log</code> inside <code>map</code> prints the list unordered ...</p>
  
  <pre><code>2. Glenna
  4. Kurtis
  5. Chelsey
  1. Patricia
  3. Nicholas
  </code></pre>
  
  <p><strong>My question is:</strong></p>
  
  <p>Why in the <em>first code</em> <code>map</code> returns the list <em>ordered</em>, and in the <em>second one</em> the <code>console.log</code> inside <code>map</code>, prints the list <em>unordered</em> ?</p>