Element at position

Syntax

	$set.elementAt($index)

$set[$index]

Description

Returns the element of the set at the index position.

Parameters

Name Type Description Mandatory Default
set Set A set from which an element is to be returned. yes
index Number The index of the set from which the element is to be returned. Counting starts at 0 and the chosen index may only be between 0 and $set.size() -1. yes

Return value

Type: Number/string/boolean/businss object/set

The element from the set at position index.

Examples

Valid index

	list("hello", "how", "are", "you").elementAt(3)

Output: you

Invalid index

	list("hello", "how", "are", "you").elementAt(5)

Output: null

Index without elementAt

	list("hello", "how", "are", "you")[2]

Output: are