Created
April 18, 2016 12:26
-
-
Save stmtk1/abbd3cce28f3488e0e3d3a17f3612112 to your computer and use it in GitHub Desktop.
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
hash = {'A' => 'hello', 'st' => 'come on'} | |
puts hash['A'] | |
puts hash['st'] | |
puts "\n" | |
for i in [0, 2, 5, 100] | |
puts i | |
end | |
for i in hash # ここではhashという変数は[["A", "hello"], ["st", "come on"]]としてみなされている | |
puts i[0] | |
puts i[1] + "\n\n" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment