Ruby - Control Flow
What is the output of this Ruby code?
count = 3 unless count > 5 puts 'Count is small' else puts 'Count is large' end
count = 3 unless count > 5 puts 'Count is small' else puts 'Count is large' end
count > 53 > 5 is false.unless logicunless runs the first block if condition is false, so it prints 'Count is small'.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions