title: How to make a function take in an array of numbers and give the ones less than 70?
body: <p>"write a JavaScript function that is called countFailing that takes in an array of grades and returns the number of failing grades (grades below 70).</p>
  
  <p>The function must take in one parameter that will contain an array of grades (for example, [100, 90, 100, 50, 80, 60])
  The funciton must return how many grades are faliing, where failing is a grade below 70" That's the problem</p>
  
  <p>-this is what i have so far, but when i try and submit it it says, " we called "countFailing(100,70,90)" (random numbers) andyour answer returned 2, when it should have been 0"</p>
  
  <pre><code>//enter code here 
  var counter = 0;
  var grades = "[]";
  function countFailing(grades) 
  {
      for (var i = 0; i &lt; grades.length; i++)
      {
          if (grades[i] &lt;= 69 )
          {
              counter++;
      }
      } return (counter);
  }
  </code></pre>