Mega Code Archive

 
Categories / Ruby / Statement
 

Nest if logic

age = 19 if age < 21   puts "You can't drink in most of the United States"   if age >= 18     puts "But you can in the United Kingdom!"   end end