title: Output error list from array using JS or jQuery, into specific div
body: <p>I can't find an example that shows how to do this into a specific div.</p>
  
  <p>I have a div <code>#error-list</code> and an array <code>error</code> that contains any number of error messages, such as:</p>
  
  <pre><code>var errors = ["First name is blank", "Last name is blank", "Company name is blank", "Email is blank"]
  </code></pre>
  
  <p>I want to output these errors individually as a <code>ul li</code> list into the <code>#error-list</code> div.</p>
  
  <p>How would this be done? I have seen examples that create each li but do not specify where they are output. E.g:</p>
  
  <pre><code>for (i = 0; i &lt; myArray.length; i++) {
      var liElement = document.createElement('li');
      liElement.appendChild(myArray[i]);
  }
  </code></pre>