title: Return from function that uses multiple async calls
body: <p>So the basic idea was to write a method that will scrap webpage to get JSON data that contains rating of a product. Then call this method multipletimes over few domains (.de, .uk, .fr, .nl etc) to collect all ratings.</p>
  
  <p>So I ended up with <code>scrapWebPage</code> method which scraps single page:</p>
  
  <pre><code>const scrapWebPage = async (countryAppData, productNumber) =&gt; {
      const shopUrl = `https://www.shopExample.${countryAppData.countryCode}/?q=${productNumber}`
      const avoidCORSUrl = 'https://allorigins.me/get?url=' + shopUrl + '&amp;callback=?'
  
      return await axios
          .get(avoidCORSUrl, {xmlMode: false, normalizeWhitespace: true})
          .then(response =&gt; {
              const $ = cheerio.load(response.data)
              let scrapedWebPageJson
  
              contentForParsing = $("script").get().children[0].data                   
              scrapedWebPageJson = JSON.parse(contentForParsing)
  
              return scrapedWebPageJson
          })
  }
  </code></pre>
  
  <p><code>scrapWebPage</code> also contains some parsing to return some JSON data I want - it resolves correctly (tested this) and returns Promise. </p>
  
  <p>But then I'd like to call this method over multiple domains so I created <code>getProductDataFromManyDomains</code>:</p>
  
  <pre><code>const getProductDataFromManyDomains = (productNum) =&gt; {
      let prodData = {
          reviews: []
      }
  
      const appCountries = [
          {countryCode: 'nl'}, 
          {countryCode: 'pl'},
          {countryCode: 'de'}
      ]
  
      appCountries.forEach(async countryApp =&gt; {
          let countryData = {}
  
          let parsedWebPage = await scrapWebPage(countryApp, productNum)
  
          countryData.countryCode  = countryApp.countryCode
          countryData.ratingCount  = parsedWebPage.aggregateRating.ratingCount
          countryData.ratingValue  = parsedWebPage.aggregateRating.ratingValue
          countryData.reviews      = parsedWebPage.reviews   
  
          prodData.reviews.push(countryData)
      })
  
      return prodData
  }
  </code></pre>
  
  <p>And now I receive <code>prodData</code> before populating... while I'd like to receive actual data (populated <code>prodData</code>). </p>
  
  <p>I'm not sure how I should construct this <code>getProductDataFromManyDomains</code> method to actually return data and not <code>prodData</code> before populating. Is that possible? Or what is good pattern here to deal with stuff like that?</p>