Break StatementSwift 4 break statement is used in two cases:
In the case of nested loops, the break statement terminates the inner most loop andstart executing the next line of the code after the block. Syntax:The syntax of Swift 4 break statement is: Flow diagram of Swift 4 break Statement Example:Output: Value of index is 11 Value of index is 12 Value of index is 13 Value of index is 14 Value of index is 15 Value of index is 16 Value of index is 17 Value of index is 18 Value of index is 19 Value of index is 20 Value of index is 21 Value of index is 22 Value of index is 23 Value of index is 24
Next TopicContinue Statement
|