Returns the position of the first occurrence of the object obj. If the object obj is not contained in the list the return value is: -1.
indexOf(Object obj) | |||
---|---|---|---|
Argument | object | obj | Object for which the position should be determined |
Return value | Integer | Position of the first occurrence of the object obj in the list. If the object obj is not contained in the list the return value is: -1. |
Formula | Result |
---|---|
=List{'a','b','c'}.indexOf('b') | 1 |