title: Looping through array in if statement to check if all values pass
body: <p>I have a variable 'fieldCount' that is equal to 5 (the number of fields I have).  How can I write the following out without specifically stating each index:</p>
  
  <pre><code>if (
     fields[0].checkValidity() &amp;&amp; fields[1].checkValidity() &amp;&amp; fields[2].checkValidity()
     &amp;&amp; fields[3].checkValidity() &amp;&amp; fields[4].checkValidity()
  ) {
      fieldsPass = true;
  }
  </code></pre>