KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I would like to know how to return a specific key from a Hash? Example: moves = Hash["Kick", 100, "Punch", 50] How would I return the first key "Kick" from this Hash? NOTE: I'm aware that the following function will return all keys from the hash but I'm just interested in returning one key. moves.keys #=> ["Kick", "Punch"]
Tags (comma-separated)
Save Edits
Cancel