Searches the array for the passed object. If found, it returns its index in the array. Returns
Nothing if the object is not in the array. First the method looks to see if the exact object exists in the array (with a memory lookup). If it doesn’t, the method then checks the values of
Text objects to find a match.
array.find(obj as Object) as (Number or Nothing)
obj. The object whose index you wish to find
- The index of the requested object as a
Nothingif the object isn’t found.
var a = ["a", "b", "c", "d"] a.find("b") # => 1 a.find("e") # => Nothing