Ruby - Control Flow
Identify the problem in this code snippet:
unless user.nil? puts 'No user' end
unless user.nil? puts 'No user' end
user.nil? is true if user is nil.unless user.nil? runs code if user is NOT nil, but message says 'No user', which is opposite.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions