title: How to get data from textarea HTML tag in an array and then loop through it?
body: <p>I'm creating a webpage which would collect links from the user and simply open every link in a new tab. For collecting links I am using HTML's <code>&lt;textarea&gt;</code> tag with a submit button.</p>
  
  <p>User is expected to give only one link for each line</p>
  
  <pre><code>https://google.com
  https://stackoverflow.com
  https://facebook.com
  </code></pre>
  
  <p>I would open links by sending each passing each URL through this function.</p>
  
  <pre class="lang-js prettyprint-override"><code>function open(url) {
    var open= window.open(url, '_blank');
    open.focus();
  }
  </code></pre>
  
  <p>But how exactly to run loop? How to get values from <code>textarea</code> in an array and then run a loop which would send value at every index to this function?</p>
  
  <p>If you think this could be done in a better than other than this, feel free to add your method.</p>