1. Technology
Send to a Friend via Email
You can opt-out at any time. Please refer to our privacy policy for contact information.

Index Operator



Index Operator - An operator used to retrieve individual elements from a collection of elements, such as a hash or array. In Ruby, the index operator usually takes the form of square brackets following a variable names. When used with arrays, the operand (which is placed inside the square brackets) is the position of the desired element in the array. When used with hashes, the operand is the key associated with the desired value.

  1. About.com
  2. Technology
  3. Ruby
  4. Glossary
  5. G - L
  6. Index Operator

©2014 About.com. All rights reserved.