title: How do I use innerHTML inside a loop using JavaScript?
body: <p>Here is the code and snippet: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var amount = prompt("How many list items would you like?");
  
  if(isNaN(amount) || amount &lt; 1) {
      alert("Please enter a positive whole number");
  } else {
      for(i = 0; i &lt;= amount; i++) {
          document.getElementById("content").innerHTML = "Loop: " + i + "&lt;br&gt;"; 
      }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="content"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Hi, I'm a new to Javascript and I can't figure this out. How can I write into the div tag "content" using the loop to display values inside the div tag per loop? </p>