Ruby - Control Flow
Identify the error in this Ruby code snippet:
case number when 1 puts 'One' when 2 puts 'Two' else puts 'Other'
Identify the error in this Ruby code snippet:
case number when 1 puts 'One' when 2 puts 'Two' else puts 'Other'
end keyword.else is used correctly, parentheses are optional, and puts is valid.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions