ANS :
for(int i=0, i<10:i++)
{
if(i==6)
{
i=10;
}
}
{
if(i==6)
{
i=10;
}
}
Here I am trying to iterate from 0 to 9. This loop is iterating till Condition i<10 matches.
Now in iterating, when loop comes i=6 I will make i=10.
So in next iteration, i<10 condition is mismatched. So it comes out from loop.
There is no any keyword used or any exception generated.
Bonus Tip : You can run swift code online here