About Pi Downloads Documentation Plugins Developer Forum Issues

pi.util.Array.indexOf

Summary

Return the first index at which a given element can be found in the array, or -1 if it is not present.

Syntax

pi.util.Array.indexOf(array,value)

Usage Example

>>> var list = [3,5,7,9]
>>> pi.util.Array.indexOf(list,3)
0

See Also