In R, to prematurely exit a while loop, you can use the ______ keyword.

  • break
  • stop
  • exit
  • quit
In R, to prematurely exit a while loop, you can use the 'break' keyword. When the 'break' statement is encountered within the loop's code block, it immediately terminates the loop execution, and the program continues with the next statement after the loop. This allows for early termination of the loop based on certain conditions.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *