This attribute returns the first element of an array. The datatype of the attribute depends on the data type of the array on which it is applied. For example, the first element of a String array will always be a String.
Returns
Example
array as String[]= ["Hello","World","!!!"] display array.firstThe expected result is "Hello".
This attribute returns the last element of an array. As with first, the datatype of the attribute depends on the data type of the array on which it is applied.
Returns
Example
array as String[]= ["Hello","World","!!!"] display array.lastThe expected result is "!!!".