Click to See Complete Forum and Search --> : Exclude last item from the loop


mili
08-09-2003, 01:26 PM
I want to start looping from the 3rd item thro' the last but one item.ie I want to exclude the last item from the loop.Where am I going wrong in my loop statement?

for (var i=2;i<child.length;i++)

thanks

mili
08-09-2003, 01:36 PM
Never mind...I figured it out...it was silly!

for (var i=2;i<child.length-1;i++)