Ruby - Loops and Iteration
Identify the error in this Ruby code:
i = 1 while i < 5 puts i i = i + 1
i = 1 while i < 5 puts i i = i + 1
while loop must be closed with an end keyword in Ruby.endend to close the loop, causing a syntax error.end to close the while loop -> Option Cend [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions