Ruby - Control Flow
Identify the error in this Ruby code:
if x = 5 puts 'x is 5' end
if x = 5 puts 'x is 5' end
= which assigns 5 to x instead of comparing.== for comparison, = is assignment [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions