Conditional Loop in Swift- Do-While

The other variation of the while loop, known as the do–while loop, performs a single pass through the loop block first, before considering the loop’s condition. It then continues to repeat the loop until the condition isfalse. Here’s the syntax of a do–while loop:

Here’s the Snakes and Ladders example again, written as a do–while loop rather than a …