Skip to content

iter::indexOf ​

indexOf(items, target)
indexOf(items, target, startIndex: Integer) ​

ParameterTypeDescription
itemsIterableThe Iterable to look in
target*The value to search for
(optional) startIndexIntegerWhich index to start at

Returns ​

(Integer) The index of the first item with the given value, or -1 if no match was found.