title: Style array elements Javascript
body: <p>I have an array of test scores that need to be the color red if they are under a 70 percent so I created an array and a for loop to pick those out of this array. However when I try to set those array elements to the color red I get this error. I am a bit new to JS so it could be an easy fix. </p>
  
  <p>The array works and it will print the scores under 70 in the console log if however I can not get them to be red. Any ideas? </p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot set property 'color' of undefined
        at index.html:23</p>
  </blockquote>
  
  <pre><code>&lt;script&gt;
      var scoresArray = [84, 72, 56, 84, 0, 76, 72, 68, 70];
      for (var i = 0; i &lt; scoresArray.length; i++) {
        if(scoresArray[i] &lt; 70) {
          var c = scoresArray[i];
          c.style.color = "red";
        }
      }
      testgen(scoresArray);
  &lt;/script&gt;
  </code></pre>
  
  <p>The function testgen is called from an external script. </p>
  
  <pre><code>function testgen(scoresArray) {
    document.write("&lt;li class=\"special\"&gt;");
    for (var i=0; i&lt;scoresArray.length; i++) {
      document.write("&lt;li&gt;" + scoresArray[i] + "&lt;/li&gt;");
    }
    document.write("&lt;/li&gt;");
  }
  </code></pre>