title: How do I average the elements that are above a threshold in an array?
body: <p>I am trying to average all the elements that are above 150 in an array. I can't figure out how to make it all work out and output the correct numbers. Can anyone help?</p>
  <pre><code>   function averageBig(list) {
          var sum = 0;
          for (var i = 0; i &lt; list.length &amp;&amp; 150; i++) {
              if (list.length &gt; 1000); {
              sum += list[i]
              }
          }    
          return (sum / list.length); 
      }
  </code></pre>