title: How do I turn my “for” loop into a “for of” loop?
body: <p>i am trying to turn this for loop into for each loop.</p>
  <pre><code>        for (int i = 0; i &lt; appointments.size(); i++) {
              if (appointments.get(i).equals(appointment)) { 
                appointments.get(i).setAvailability(true);
              }
          }
     
  </code></pre>