title: Display content of [object HTMLUListElement] using javascript
body: <p>I have a javascript function which generates a ul list based on an array being passed in using a similar approach to this - <a href="https://stackoverflow.com/questions/11128700/create-a-ul-and-fill-it-based-on-a-passed-array">Create a &lt;ul&gt; and fill it based on a passed array</a></p>
  
  <p>However, when I do the following... </p>
  
  <pre><code>document.getElementById("list").innerHTML = generateListFromArray(array);
  </code></pre>
  
  <p>All that gets printed is </p>
  
  <pre><code>[object HTMLUListElement]
  </code></pre>
  
  <p>Can anyone tell me how to print the contents into the div as HTML?</p>