title: textarea into array javascript
body: <p>myList contains the following values:</p>
  
  <blockquote>
    <p>value1<br>
    value2<br>
    value3  </p>
  </blockquote>
  
  <pre><code>function showArray() {
    var txt = $("#myList").text();
    var textread = txt.split('\n');
  
    var msg = "";
    for (var i = 0; i &lt; textread .length; i++) {
      msg += i + ": " + textread [i] + "\n";
    }
    alert(msg);
  }
  </code></pre>
  
  <p>my alert gives me the following:</p>
  
  <blockquote>
    <p>0:value1<br>
    value2<br>
    value3  </p>
  </blockquote>
  
  <p>It`s not what I wanted and expecting, I was expecting something like:</p>
  
  <blockquote>
    <p>0: value1<br>
    1: value2<br>
    2: value3 </p>
  </blockquote>
  
  <p>How can I get the values as expected?</p>