title: JS - How to start from new line inside for loop?
body: <p>I am trying to print 6 random numbers after clicking a button. Then every time I click the button again, random numbers should start from new line however I do not know how. I tried everything and nothing works. I appreciate any help.</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>        function fname() {
              for(i=1; i&lt;=6; i++) {
                      number = number + Math.floor(Math.random() * 47 + 1) + "-";
                      var print = number + " GOOD LUCK!";
              }
              document.getElementById("total").value = print;
          }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Let's ROLL!&lt;/title&gt;
          &lt;meta charset="UTF-8"&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
          &lt;style&gt;
              input, button {display: block;}
          &lt;/style&gt;
          &lt;script&gt;
          var number = "";
          function fname() {
              for(i=1; i&lt;=6; i++) {
                      number = number + Math.floor(Math.random() * 47 + 1) + "-";
                      var print = number + " GOOD LUCK!";
              }
              document.getElementById("total").value = print;
          }
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div&gt;
              &lt;button onclick="fname()"&gt;ROLL!&lt;/button&gt;
              &lt;textarea id="total" rows="12" cols="50" readonly&gt;&lt;/textarea&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>