title: Changing CSS-property of all elements in array
body: <p>I want to change <code>.style.backgroundColor</code> of all <code>&lt;time&gt;</code> elements within some <code>&lt;div id="div"&gt;</code>. 
  I resolved it like this:</p>
  
  <pre><code>var times = div.getElementsByTagName("time");
  for (var i = 0; i &lt; times.length; i++) {
      times[i].style.backgroundColor = "#d00";
  }
  </code></pre>
  
  <p>Is it possible to optimize the code so it will take as less variables as possible? Or maybe there is a way to do this with a single line?<br>
  P.S.: Using no JQuery;</p>