Removing text from an array
<p>I have the following script which works:</p>

<pre><code>classes = $(this).attr("class").split('_');
</code></pre>

<p>If <code>$(this)</code>'s class was:</p>

<pre><code>class="billed_department_employee_client_code"
</code></pre>

<p>The end result would look like this:</p>

<pre><code>["billed", "department", "employee", "client", "code"] 
</code></pre>

<p>This is exactly what I want as it allows me to do stuff like this</p>

<pre><code>console.log( classes[0] );
console.log( classes[1] );
console.log( classes[2] );
console.log( classes[3] );
</code></pre>

<p>Is it possible to remove a single value from <code>classes</code> and move the rest of the values back?</p>

<p>For example,</p>

<p>if <code>classes</code> contains <code>department</code>, remove it.  So, if it looks like this:</p>

<pre><code>["billed", "department", "employee", "client", "code"] 
</code></pre>

<p>it should become:</p>

<pre><code>["billed", "employee", "client", "code"] 
</code></pre>

<p>How can this be done?</p>
