Iterative Logic in UiPath

Question: A developer has a workflow in which the value of a counter needs to be evaluated before the body of the loop is executed. Which Control Flow activity should be used?

  •   Switch
  •   Do While
  •   While
  •   If

Answer

Option B is correct.

The “Switch” and “If” statements are not loops. “While” loop evaluates the variable before the loop. The “Do While” loop evaluates the condition at the end of the loop. This should read as Do “Something first” while the loop is executing.