title: Child element is not being added to parent (parent.appendChild)
body: <p>I'm pretty sure I'm going to kick myself hard (very hard) when I see an answer to this but when I do <code>console.log(markerDiv)</code> the console just outputs the img element. What am I doing wrong?</p>
  
  <p>Edited as answers suggest:</p>
  
  <pre><code>var dynamic = document.createElement("img");
  dynamic.src = "images/dynamic.png";
  dynamic.setAttribute("id", "img-" + markerData[data].registration);
  var markerDiv = document.createElement("div");
  markerDiv.appendChild(dynamic);
  
  console.log(markerDiv);
  </code></pre>
  
  <p>Result of console.log:</p>
  
  <p><img src="https://i.stack.imgur.com/RzxfF.png" alt="enter image description here"></p>
  
  <p>Thanks</p>