http://qs1969.pair.com?node_id=1023788


in reply to Re: Is it safe to append to the array you are iterating over (yes)
in thread Is it safe to append to the array you are iterating over

I wouldn't be surprised now if even splice might not confuse the loop as long as you are splicing parts of the array that the loop iterator hasn't reached yet.

--DrWhy

"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."