Skip to content

Instantly share code, notes, and snippets.

@scottillogical
Created August 4, 2011 14:54
Show Gist options
  • Save scottillogical/1125349 to your computer and use it in GitHub Desktop.
Save scottillogical/1125349 to your computer and use it in GitHub Desktop.
irb(main):001:0> [:hi, :what]
=> [:hi, :what]
irb(main):002:0> a = [:hi, :what]
=> [:hi, :what]
irb(main):003:0> a[0]
=> :hi
irb(main):004:0> a[2]
=> nil
irb(main):005:0> a[1]
=> :what
irb(main):006:0> a[1, 0]
=> []
irb(main):007:0> a[2, 0]
=> []
irb(main):008:0> a[3, 0]
=> nil
irb(main):009:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment