Menu
×
×
Correct!

Exercise:

Use the correct keyword to exit the loop if i is equal to 4.

i <- 1 while (i < 6) { print(i) i <- i + 1 if (i == 4) { break } }

Not Correct

Click here to try again.

Correct!

Next ❯
i <- 1
while (i < 6) {
  print(i)
  i <- i + 1
  if (i == 4) {
    
  }
}

  
  
  




Go to w3schools.com
Reset Score
Close This Menu

 

R Syntax
R Variables
R Data Types
R Math
R Strings
R Booleans
R Operators
R If...Else
R Loops
R Functions
R Data Structures

×

Reset the Score?

This will reset the score of ALL 40 exercises.

Are you sure you want to continue?



×

Congratulations!

You have finished all 40 R exercises.

Share your score: