Skip to content

Instantly share code, notes, and snippets.

@beezeebly
Created December 29, 2013 19:34
Show Gist options
  • Save beezeebly/8173910 to your computer and use it in GitHub Desktop.
Save beezeebly/8173910 to your computer and use it in GitHub Desktop.
Ruby array element retrieval
authors = ["Arthur Conan Doyle", "J.K. Rowling", "J.R.R. Tolkien", "Hanif Kureishi"]
authors[0] # => "Arthur Conan Doyle"
authors[1] # => "J.K. Rowling"
authors[2] # => "J.R.R. Tolkien"
authors[3] # => "Hanif Kureishi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment