|
HOW DO I REMOVE AN ELEMENT FROM AN ARRAY AND THEN RE INDEX THAT ARRAY SO I DONT GET "undefined" IN MY OUTPUT OF THE ARRAY.
IE
3 ARRAY elements defined
item_links[0] = "one"
item_links[1] = "two"
item_links[2] = "three"
outputing the above correctly shows
one
two
three
HOWEVER if I
item_links.splice(0,1); /* remove element 0 */
the output is then
undefined
two
three
cheers
|