title: Changing a loop to Promise.all()
body: <p>I'm currently iterating through an array, making an api request, waiting for it to resolve, then moving onto the next api call.</p>
  <p>I've read of using <code>Promise.all()</code> and I think I could make these api calls in parallel and wait for that promise to resolve, but I'm not exactly sure how to translate what I have here to use <code>Promise.all()</code>.</p>
  <pre><code>async lockFolder(folderModel) {
          const driveId = folderModel.driveId;
  
      // THIS IS WHAT I'D LIKE TO TRANSLATE TO USE Promise.all()
      for (const file of folderModel.docs) {
          let res = await this._lockFile(file.id, driveId);
      }
  
      // return something....
  }
  
  async _lockFile(fileId, driveId) {
      try {
          return await axios.post(myRequestOmittedForBrevity);
  
      } catch (err) {
          //some error
      }
  
  }
  </code></pre>
  <p>Is there a good way to translate my loop to <code>Promise.all()</code>? Can I still use <code>await</code> for it's response? Most examples I've seen use <code>.then()</code> but I've been trying to stick with <code>await</code>. Any help is appreciated!</p>