title: How to loop over an Array with JavaScript?
body: <p>I have a string that has data separated by a pipe character (<code>|</code>).</p>
  <h3>Example</h3>
  <pre><code>var somestring = &quot;data1|data2|data3&quot;;
  var separated = somestring.split(&quot;|&quot;);
  </code></pre>
  <p>I know how to use the <code>split()</code> to separate each data.</p>
  <p>However, I don't know how many pipes there will be in the resulting <code>Array</code>.</p>
  <p>In jQuery or JavaScript, how do I loop over the array returned?</p>