lastIndexOf()
Table of Contents
Overview
The lastIndexOf() function takes listVariable and searchElement as arguments. It returns the last occurrence index of searchElement in listVariable.
If searchElement is not found in listVariable, the function will return -1.
Return Type
- Number
Syntax
Parameter | Description | Data type |
---|---|---|
<variable> | Variable which will contain the returned index number. | NUMBER |
<listVariable> | The list variable from which the index number of the element will be returned. | LIST |
<searchElement> | The element whose last occurrence will be checked in the list. | AS APPLICABLE |
Examples
lastIndex = listVar.lastIndexOf("Creator"); //returns 0