Javascript: DOM 4

Looking at the function called line-by-line we have:


function setColorRed(){

We then create the variable myContent and set its value to the element with the id "content".


  var myContent = document.getElementById("content");

Finally we access that elements style property color and set its value to red.


  myContent.style.color = "red";
}