title: find average of an array of objects
body: <p>I am trying to find the average of just the females in the given array </p>
  
  <pre><code>sortArray([
      {name:'Sarah', gender:'female', age:25},
      {name:'Tom', gender:'male', age:18},
      {name:'Tim', gender:'male', age:65},
      {name:'Kim', gender:'female', age:58}
  ]);
  </code></pre>
  
  <p>this is what i have below </p>
  
  <pre><code>function averageFemale(list)
  {
      let sum = 0;
      let femaleCount = 2;
      let avg = sum / femaleCount;
  
      for (let i = 0, i &lt; list.length; i++)
      {
          sum += list[i];
      }
  
      return avg;
  }
  </code></pre>