title: Generate url's to an unordered list in JavaScript
body: <p>I have an unordered list that works, and it is as follow. but i need it to result in links instead of regular text.</p>
  
  <p>working list:</p>
  
  <pre><code>    var navLinks = [
          "Eggs",
          "Milk",
          "Juice",
          "Diapers",
          "Bread"
      ];
  
      var ul = document.createElement("ul");
  
      for (var i = 0; i &lt; navLinks.length; i++) {
          ul.innerHTML = ul.innerHTML + "&lt;li&gt;" + navLinks[i] + "&lt;/li&gt;";
      }
  
      document.body.appendChild(ul);
  </code></pre>
  
  <p>thank you.</p>