title: how to add a line break to this javascript command
body: <p>okay I have a script that outpouts an array like so </p>
  
  <pre><code>document.getElementById("message").innerHTML = msg;
  </code></pre>
  
  <p>the result I get is</p>
  
  <pre><code>line1 line2 line3 line4
  </code></pre>
  
  <p>I want it to be like this </p>
  
  <pre><code>line1
  line2
  line3
  line4
  </code></pre>
  
  <p>I have tried adding the  in various places but just cant get it to work </p>
  
  <p>my full code</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript"&gt;
  function textareaToArray(t){
  return t.value.split(/[\n\r]+/);
  }
  function showArray(a){
  var msg="";
  for(var i=0;i&lt;a.length;i++){
  msg+= a[i]+"\n";
  }
  
  document.getElementById("message").innerHTML = msg.join("&lt;/br&gt;");
  
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;title&gt;
  Welcome To ....
  &lt;/title&gt;
  &lt;body&gt;
  &lt;center&gt;&lt;h1&gt; WELCOME TO .... &lt;/h1&gt;&lt;/center&gt;
  &lt;/br&gt;
  &lt;/br&gt;
  &lt;/br&gt;
  &lt;center&gt;&lt;form&gt;
  &lt;textarea rows="7" cols="60" name="alpha"&gt;&lt;/textarea&gt;
  &lt;br&gt;
  &lt;input type="button"
  value="show array"
  onclick="showArray(textareaToArray(this.form.alpha ))"&gt;
  &lt;/form&gt;&lt;/center&gt;
  &lt;/br&gt;
  &lt;div id="message"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>