Created
August 27, 2013 01:17
-
-
Save jendiamond/6348632 to your computer and use it in GitHub Desktop.
Exercise 9 - Learn Ruby the Hard Way
This file contains hidden or 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
# the variable days is assigned in a string | |
days = "Mon Tues Wed Thu Fri Sat Sun" | |
# the variable months is assigned with line breaks \n means newline | |
months = "Jan\nFeb\nMar\nApr\nMay\nJun\Jul\nAug" | |
# the method puts print the string then on a new line it prints | |
# the contents of the variable days | |
puts "Here are the days: ", days | |
# the method puts print the string then on a new line it prints | |
# the contents of the variable months | |
puts "Here are the months: " , months | |
# the method puts prints the paragraph | |
puts <<PARAGRAPH | |
There's something going on here. | |
With this PARAGRAPH thing | |
We'll be able to type as much as we like. | |
Even 4, 5 or even 6 lines if we want | |
PARAGRAPH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment