1. Computing

Index Operator

By

Definition:

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. Computing
  3. Ruby
  4. Glossary
  5. G - L
  6. Index Operator

©2014 About.com. All rights reserved.