Here is the final version of the nodeCollect.js we worked on in class today.

function collect() {
  var myObj = document.getElementsByTagName("p");
  console.log(myObj);
  console.log("Length of the myObj collection is:  " + myObj.length);
  var i;
  for (i = 0; i < myObj.length; i++) {
    console.log("Node at index " + i + " follows:");
    console.log(myObj[i].innerHTML);
  }
}