Mega Code Archive

 
Categories / Ruby / Statement
 

Use the ! logical negation operator

temperature = 76 if !(temperature < 65 || temperature > 85)   puts "Picnic time!" else   puts "Sorry, no picnic today." end