I want the elements which are in sequence (1,2,3) (6,7) (10,11) (15,16,17). separately
<p>Am having following array:<code>arrtooth</code></p>

<pre><code>var arrtooth = tooth.split('|');
</code></pre>

<p>It gets value </p>

<pre><code>arrtooth=[1,2,3,6,7,10,11,15,16,17];
</code></pre>

<p>I want the elements which are in sequence <code>(1,2,3) (6,7) (10,11) (15,16,17)</code>.
separately.My code is in Jquery.I just want the actual logic.</p>

<p>If i get the output as 3 2 2 3 in an array it will be fine or if you have any thing (output) which can elaborate the sequence will be ok.</p>
