Created
October 16, 2013 20:34
-
-
Save stevencombs/7014356 to your computer and use it in GitHub Desktop.
Unless control flow tests for a false condition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ruby Getting Started with Programming | |
# A Codecademy Ruby (Unless) assignment | |
# Dr. Steven B. Combs, coding novice | |
hungry = true | |
unless hungry # tests for false condition | |
puts "I'm writing Ruby programs!" | |
else # if not false, but true | |
puts "Time to eat!" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment