How to loop over an `Array` produced by `split()`?
<p>I have a string that has data separated by a pipe character (<code>|</code>).</p>

<h3>Example</h3>

<pre><code>var somestring = "data1|data2|data3";
var separated = somestring.split("|");
</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 through each separated variable? </p>
