Skip to content

iter::lastIndexOf

lastIndexOf(items, target)
lastIndexOf(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 last item with the given value, or -1 if no match was found.