Ruby - Loops and Iteration
Which of the following is the correct syntax to create an infinite loop using the loop method in Ruby?
loop method can take a block with curly braces or do...end.loop { puts "Hi" }, which is valid Ruby syntax for an infinite loop.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions