Swift Programming Tutorial: Loops
3 min readSep 3, 2021
There will be situations that you need to repeatedly execute some actions in your code. The initial instinct is to copy and paste the code multiple times. Although it works most of the time, it’s not the best practice. Especially if the way the action needs to be repeated varies. That’s where loop comes in to take care of the situation.