Created
January 1, 2018 21:38
-
-
Save ryanckulp/5476f79b1b015c3e539d8306343c716f to your computer and use it in GitHub Desktop.
multiple if examples in Ruby
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
# question 1, answer: 4 | |
if 2 + 2 == x | |
alert "Correct!" | |
else | |
alert "Incorrect!" | |
end | |
# question 2, answer: 11 | |
if 4 + 7 == x | |
alert "Correct!" | |
else | |
alert "Incorrect!" | |
end | |
# question 3, answer: 10 | |
if 7 + 3 == x | |
alert "Correct!" | |
else | |
alert "Incorrect!" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment