title: _.forEach out of order
body: <p>I have some code within an async function:</p>
  <pre><code>    let listOfResults = [];
      _.forEach(listOfProducts, async function (product) {
        const result = await calc.calculateProductScore(product);
        const response = await mutateDB.sendProductScoreData(result.productId, result);
        await listOfResults.push(response);
      })
      if (listOfResults.length &gt;= 1) {
        return &quot;yay&quot;;
      } else {
        return &quot;boo&quot;;
      }
  </code></pre>
  <p>Given that there's three items in the listOfProducts array, stepping through the debugger in VS Code when this executes this happens in the following order:</p>
  <ol>
  <li>the line <code>const result = await calc.calculateProductScore(product);</code> is executed three times</li>
  <li>the if statement (which returns <code>boo</code> as nothing has been pushed onto the <code>listOfResults</code> array)</li>
  <li>the line <code>const response = await mutateDB.sendProductScoreData(result.productId, result);</code> is executed three times</li>
  <li>the line <code>await listOfResults.push(response);</code> is executed three times</li>
  </ol>
  <p>I can see in lodash forEach documentation <a href="https://lodash.com/docs/4.17.15#forEach" rel="nofollow noreferrer">https://lodash.com/docs/4.17.15#forEach</a> it mentions that &quot;iteration order is not guaranteed&quot; - should I not be using lodash then for this type of code block? How can I use Lodash and guarantee that order of code execution?</p>