title: Return an average from an array of hash
body: <p>I am new to working with hashes in javascript and would like to write a function that takes an array of hash and returns the average &quot;grade&quot; for a class.</p>
  <p>Here is an example:</p>
  <p>Input:</p>
  <pre><code>    {&quot;string&quot;: &quot;John&quot;, &quot;integer&quot;: 7},
      {&quot;string&quot;: &quot;Margot&quot;, &quot;integer&quot;: 8},
      {&quot;string&quot;: &quot;Jules&quot;, &quot;integer&quot;: 4},
      {&quot;string&quot;: &quot;Marco&quot;, &quot;integer&quot;: 19}
     
  </code></pre>
  <p>Output: 9.5</p>
  <p>Thanks in advance!</p>