Skip to main content
Skip table of contents

Get Array Element Operator []

Syntax

anArray[anIndex]

Semantics

The operator [i] returns the i-th element of the array. The first element has the position 0. anIndex can be a static integer literal, an object of type Integer, or an action script language or expression returning an integer.

Substitutables

anArray

Can be any variable or object attribute having the type Array

anIndex

Can be any expression that evaluates to an integer.

It is not possible to use class operations as index function – only built-in action script language operations are allowed.

Examples

NONE
set arrayElement = inputContainer.myList[0];
set arrayElement = anArray[anArray.count() - 1].mySubList;
set arrayElement = anArray[indexVariable];

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.