Mega Code Archive

 
Categories / Ruby / Statement
 

If and unless also supply the else condition

# used to delimit lines of code that you want to be executed if the main expression is false: age = 10 if age < 18   puts "You're too young to use this system" else   puts "You can use this system" end