title: Nested element creation not working?
body: <p>Trying to create an element within an element. Here it is an img within an anchor tag.
  I'm using append child but the "userLogoElement" when logged out is just the img tag and anchor is an empty anchor tag. Why isn't anything happening?</p>
  
  <pre><code>         var anchor  = document.createElement('a');
           anchor.href = var0;
  
           //---- Create image element ----
           var img   = document.createElement('img');
           img.src   = var1;
           img.title = var2;
  
           //---- Combine elements ----
           var userLogoElement = anchor.appendChild(img);
  
           console.log(userLogoElement, anchor, img);
           //console says img === userLogoElement, anchor is empty
  </code></pre>