Created
January 1, 2018 22:53
-
-
Save ryanckulp/d35abac2a8fdb2c80c7777e57654be20 to your computer and use it in GitHub Desktop.
accessing a Hash key/value 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
questions = { | |
'one' => "What's your name?", | |
'two' => "How old are you?" | |
} | |
questions['one'] # => returns "What's your name?" | |
questions['two'] # => returns "How old are you?" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment