title: parameter 1 is not of type 'Node' when appendChild(img)
body: <p>I'm currently working on a side project, and working with DOM manipulation.</p>
  
  <p>Below, I created a function <code>addImage</code>. When the browser calls this function, it returns the following error:</p>
  
  <blockquote>
    <p>TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.</p>
  </blockquote>
  
  <pre><code>function addImage(data) {
      let imageElement = new Image();
      imageElement.src = data;
      console.log(imageElement);
      let imageContainer = document.getElementById('image-container');
      imageContainer.appendChild('imageElement');
  }
  
  imageElement = `&lt;img src="https://igcdn-photos-f-a.akamaihd.net/hphotos-ak-xpt1/t51.2885-19/11193017_906607852718693_821675199_a.jpg"&gt;`
  </code></pre>
  
  <p>I looked at other questions with this typeError. In those examples, string was being added to a div element.</p>