|
|
|
|
|
by 1718627440
249 days ago
|
|
But I need to adjust indices for a container when modifying anyways, regardless whether it occurs in a loop. It's not different than doing not doing it in the loop. Also I'm also modifying the loop index anyways, since I want to iterate, not always touch the same object. > And sometimes it's a simple bug where you never meant to modify the collection. How do you accidentally modify an array, which would be different from any other variable? |
|
> How do you accidentally modify an array, which would be different from any other variable?
Like you cause any other simple bug. When there are tons of things and it's not a simple variable. Or even just a typo. That also happens.