title: Change font color of div on click of button using javascript
body: <p>I want to change the font color of my div on the click of a button using javascript. I have two buttons, 'Green" and 'Red'.</p>
  
  <pre><code>&lt;button type="button" class="green"&gt;Green&lt;/button&gt;
  &lt;button type="button" class="red"&gt;Red&lt;/button&gt;
  </code></pre>
  
  <p>This is my div</p>
  
  <pre><code>&lt;div id="timer"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>currently the font is red (default color), but once 'green' is clicked it will go green and when 'red' is clicked it will go back to red. </p>
  
  <p>I know this is probably very simply but for some reason I can't get it to work :)</p>
  
  <p>If you know how would be greatly appreciated.</p>