About For Loop

Hello,

Summary:

As you know for loop takes first and last index parameters.

I set (0) to first & (x array length - 1) to last index.

But if I remove index from (x array) it’s affecting for loop last index, even if it’s already executed looks like still dynamicly getting value of x array length.

Is this normal behaviour ?

Currently I’m holding x array length in seperate variable(local) to avoid this.

Is this right ?

You shouldn’t modify an array while iterating over it :slightly_smiling_face:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.