The array to search.
Optionalproperty: stringThe property to test on each array element.
Optionalvalue: anyThe value to test the property against. Must pass a strict (===) comparison check.
OptionalstartIndex: numberAn optional start index to search from. You can also set startIndex to -1 to start the search from the end of the array. Default 0.
OptionalendIndex: numberAn optional end index to search up to (but not included) Default array.length.
Returns the first element in the array.
You can optionally specify a matching criteria using the
propertyandvaluearguments.For example:
getAll('visible', true)would return the first element that had itsvisibleproperty set.Optionally you can specify a start and end index. For example if the array had 100 elements, and you set
startIndexto 0 andendIndexto 50, it would search only the first 50 elements.You can also specify a negative
startIndex, such as-1, which would start the search at the end of the array