title: JavaScript failed to execute 'appendChild' on 'Node' parameter 1 is not of type 'Node'
body: <p>The idea is that when the screen gets under 800px the element thatare in the questLinks array go in the ul with the id of 'links'.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>let isActivated = false;
  
  var questLinks =[
  document.createElement("li").textContent ="&lt;li&gt;&lt;a href=\"index.php\" class=\"tab\"&gt;Home&lt;/a&gt;&lt;/li&gt;",
  document.createElement("li").textContent ="&lt;li&gt;&lt;a href=\"choose-language.php\" class=\"tab\"&gt;Quests&lt;/a&gt;&lt;/li&gt;",
  document.createElement("li").textContent ="&lt;li&gt;&lt;a href=\"battlesequence.php\" class=\"tab\"&gt;Battle arena&lt;/a&gt;&lt;/li&gt;",
  document.createElement("li").textContent ="&lt;li&gt;&lt;a href=\"ranking.php\" class=\"tab\"&gt;Rankings&lt;/a&gt;&lt;/li&gt;",
  document.createElement("li").textContent ="&lt;li&gt;&lt;a href=\"clanPage.php\" class=\"tab\"&gt;Clan&lt;/a&gt;&lt;/li&gt;",
  document.createElement("li").textContent ="&lt;li&gt;&lt;a href=\"profile.php\" class=\"tab\"&gt;Profile&lt;/a&gt;&lt;/li&gt;",
  document.createElement("li").textContent ="&lt;li&gt;&lt;a href=\"AboutUs.php\" class=\"tab\"&gt;About&lt;/a&gt;&lt;/li&gt;",
  document.createElement("li").textContent ="&lt;li&gt;&lt;a href=\"contactus.php\" class=\"tab\"&gt;Contact us&lt;/a&gt;&lt;/li&gt;"
  ];
  
  function move() {
   var headerList = document.getElementById('list');
  
   if (document.getElementById("bod").clientWidth &lt;= 800 ) {
    console.log("Width &lt; 800");
    if (isActivated == false) {
     console.log("isActivated = " + isActivated);
     for (link of questLinks) {
      console.log("There he is.");
      headerList.appendChild(link);
     }
     isActivated = true;
    }
  
   }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>This code results in the error: " JavaScript failed to execute 'appendChild' on 'Node' parameter 1 is not of type 'Node' "</p>