title: Javascript getElementsByTagName("div") what am I labeling?
body: <p>I'm attempting to set the IDs of a group of divs "galleryboxes" (that are inside a another div, "galleryimages") to be increasing increments, ie. picture1, picture2, etc. </p>
  
  <p>I've seen questions similar to this and tried to get my head around them, but it's difficult. Right now my questions are, what do I get from the second line here? What is 'galleryboxes'? Am I able to cycle through it like an array and label ids like I'm attempting to?</p>
  
  <pre><code>var galleryimages = document.getElementById("galleryimages");
  var galleryboxes = galleryimages.getElementsByTagName("div");
  
  var k = 1;
  
  for (var i = 0; i &lt; galleryboxes.length; i++) {
  galleryboxes[i].setAttribute=("id", "picture" + k);
  k++;
  }
  </code></pre>
  
  <p>The code seems to work, but I don't think I'm actually labeling the divs I want to be labeling; I check what the contents are of "picture1" and it comes up as null (It should be full of a picture and some text).</p>