Ruby - Operators and Expressions
What will this Ruby code print?
value = false if value puts "Yes" else puts "No" end
value = false if value puts "Yes" else puts "No" end
value is assigned false, which is falsy in Ruby.value is falsy, the else branch executes, printing "No".15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions