Mega Code Archive

 
Categories / Ruby / Statement
 

Unless and until

An unless statement is really like a negated if statement if lang == "de"   dog = "Hund" else   dog = "dog" end # Now I'll translate it into unless: unless lang == "de"   dog = "dog" else   dog = "Hund" end