Google News
logo
Swift - Interview Questions
State the control transfer statements present in ios Swift.
The control transfer statements present in ios Swift are as follows :
 
Continue : The continue statement skips the current iteration of a loop and directs the program's control flow to the next iteration.

Break :
When the break statement is found, a loop is immediately terminated.

Return :
In Swift, the return statement is used in functions and methods to return values that meet our needs. In the Swift programming language, we can return values from functions/methods based on our requirements by utilising the return keyword.

Fallthrough :
The fallthrough keyword merely directs code execution to the statements contained in the following case (or default case) block.
Advertisement