<html>
<body>
You can do that using the shift() method. Think of it as taking the first
element and &quot;shifting&quot; it to the left, out of the array. You
can do it using the following format.<br><br>
var chevCar = new
Array(&quot;Nova&quot;,&quot;Impala&quot;,&quot;Corvette&quot;);<br>
alert(&quot;The original lineup is &quot; + chevCar);<br><br>
chevCar.shift();<br><br>
alert(&quot;The new lineup is &quot; + chevCar);<br><br>
The first part of the script works just like the previous above. However,
after displaying all of the elements, it removes the first one and
displays an alert window with the remaining two elements.<br><br>
(See:
<a href="http://www.webreference.com/programming/javascript/diaries/13/4.html" eudora="autourl">
http://www.webreference.com/programming/javascript/diaries/13/4.html</a>
)<br><br>
<br>
Lee Underwood<br>
<font color="#FF0000">Jupiter</font>media Corporation<br><br>
<font size=1>Managing Editor<br>
WebDeveloper.com | ScriptSearch | JavaScript Source | TheCounter |
TheGuestbook<br><br>
Associate Editor<br>
WebReference.com</font> <br><br>
<br><br>
On 9/7/2006 10:48 AM, Terry Riegel wrote:<br>
........................................................<br><br>
<blockquote type=cite class=cite cite="">Hello All,<br><br>
How do I remove the first item from an array?<br><br>
Terry</blockquote>
........................................................<br>
</body>
</html>