title: Get id attribute from a node in nodelist
body: <p>I have currently got a nodelist by using the document.getElementsByClassName method in javascript. I then check if the first node has any children and if not I would return a document.getElementById with that nodes ID.  I am unsure of how to get the ID from the node list.</p>
  
  <pre><code> var columns = document.getElementsByClassName('.col-md-4.column');
  
  if (countChildren(columns[0].childNodes) == 0) {
      return document.getElementById(columns[0].) //not sure what goes here
  }
  </code></pre>