[] (array access operator)
Previous  Top  Next

Syntax
myArray[n]

Arguments
Index of the array element to return.

Returns
Returns / allows access to the nth element of an array.

Description
Used to access the nth element of an array.
Note that all elements of the array should be initialised before access.

Sample
n = 1
myArray[0] = 1;
myArray[1] = 2;
myArray[2] = 3;

b = myArray[n]; // b now contains the value 2