What is the best way to do a for loop?

I want to do for loop , I thought about while loop with counter , while counter < x and add +1 to the counter in the end .

There is a better way ?

Thanks in advance,

can be done with a for each as well:

iteration list: Enumerable.Range(0, lengthAsInt)
use of Output index or the loop variable for the current run

This solution requires less activities



In this scenario,while loop is the better option as you can put assign activity to increment/decrement yout counter value and loop exists once the condition met


1 Like